How to get Client Secret Expiry details through an API

Sreeni G 0 Reputation points
2023-01-11T14:58:50.2166667+00:00

Hello,

I'm new to Azure API Management and as you may know that client secret expiry can be extended to only 2 years.

Now, I wanted to pull the expiry information through an API.

Example: I will call Azure API based on client id, so that Azure gives me the Expiry details of given client id. Could someone please help with this? Thanks in advance.

Regards,

Sreeni

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

1 answer

Sort by: Most helpful
  1. TP 125.8K Reputation points Volunteer Moderator
    2023-01-11T17:17:40.2266667+00:00

    Hi Sreeni,

    You can use below Get application in Microsoft Graph to retrieve the application object. To find the expiration you need to examine PasswordCredentials and passwordCredential's EndDateTime property.

    Get application

    https://learn.microsoft.com/en-us/graph/api/application-get?view=graph-rest-1.0&tabs=http

    passwordCredential resource type

    https://learn.microsoft.com/en-us/graph/api/resources/passwordcredential?view=graph-rest-1.0#properties

    application resource type

    https://learn.microsoft.com/en-us/graph/api/resources/application?view=graph-rest-1.0

    If the above was useful, please Accept Answer.

    Thanks

    -TP

    2 people found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.