The spring-cloud-azure-starter-active-directory
library is mainly used for things like logging in users with Azure AD, Access other resources like Microsoft Graph or Azure services from a resource server or securing REST APIs. If you want to get information about your app’s client secret like when it expires, you need to use the Microsoft Graph API. But it doesn't let you retrieve the application's own client secret metadata like expiry date.
to retrieve client secret expiry data, you can call REST API https://graph.microsoft.com/v1.0/applications/passwordCredentials
POST https://login.microsoftonline.com/TenantID/oauth2/v2.0/token
client_id: ClientID
client_secret: Secret
scope: https://graph.microsoft.com/.default
grant_type:client_credentials
https://graph.microsoft.com/v1.0/applications/passwordCredentials
and see the password Credentials section for details of client secret and its expiry.