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

John Parsons 1 Reputation point

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

    Sure, look at the passwordCredentials/keyCredentials property of the app object, and the endDateTime value therein:
    If you are looking for ready-to-use solution, here's one of my sample scripts:

    1 person found this answer helpful.