Required refresh Token with grant_type is client_credentials ?

sundeep kumar 1 Reputation point
2022-07-25T12:28:17.667+00:00

Hi All,

I am able to generate Access Token using grant_type client_credentials, but this token expires in 3599 and it does not give any refresh_Token,

Can you please let us know, how will I generate new Access token once it expired?

224325-image.png

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,769 questions
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,650 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShivaniRai-MSFT 2,726 Reputation points
    2022-07-25T12:46:20.223+00:00

    Hi @sundeep kumar ,

    The client credential flow you are using will not issue refresh tokens, but you can extend the lifetime of the access token by configuring the access token lifetime policy, but the maximum lifetime of the token still cannot exceed 24 hours. You can get refresh token with authorization code grant flow where the user logs in will issue the refresh token.

    Please go through this thread for more information: https://learn.microsoft.com/en-us/answers/questions/633248/graph-api-how-to-get-and-use-a-refresh-token-in-my.html

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

    0 comments No comments