How to change expiry date of refresh token?

29313428 0 Reputation points
2023-02-17T15:51:23.99+00:00

Hello,

I have successfully implemented Azure AD authentication in my Angular app using MSAL and all works as expected. Access token is set for 1 hour and after that, with the usage of refresh token I can renew it.

However, I want to be able to change the lifetime of my refresh token which as far as I read in the documentation, is 90 days. Have tried to find an actual information about that online but no results so far.

Could you please help me out?

Best,
Arsen.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,723 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 27,016 Reputation points Microsoft Employee
    2023-02-17T19:22:51.4833333+00:00

    Hi, the lifetime of a refresh token cannot be changed. The lifetime of a refresh token is set to 90 days by default and cannot be reduced or lengthened.

    However, you can configure the sign-in frequency in Conditional Access to define the time periods before a user is required to sign in again. This way, you can control the frequency of sign-ins and the time periods before a user is required to sign in again.

    You can learn more about this in the following article: https://docs.microsoft.com/en-us/azure/active-directory/develop/refresh-tokens

    Please let me know if you have any other questions and I can help you further.

    If this answer helped you please mark it as "Verified" so other users can reference it.

    Thank you,

    James

    1 person 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.