IS there a way to check expiration of Azure Application Secret Key

John Parsons 1 Reputation point
2022-10-31T15:24:04.93+00:00

I have an application and have a ClientId, ApplicationId, and Secret Key. is there anyway programmatically to check if the Secret Key's expiration? Or just to check if the Secret Key is valid before I try to access GraphAPI?

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
14,870 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vasil Michev 71,621 Reputation points MVP
    2022-10-31T15:48:13.73+00:00

    Sure, look at the passwordCredentials/keyCredentials property of the app object, and the endDateTime value therein: https://learn.microsoft.com/en-us/graph/api/resources/application?view=graph-rest-1.0
    If you are looking for ready-to-use solution, here's one of my sample scripts: https://www.michev.info/Blog/Post/3665/azure-ad-application-registration-inventory-script

    1 person found this answer helpful.