Azure Directory B2C session time

Ajay Gour 0 Reputation points
2024-09-09T14:37:14.4566667+00:00

Token lifetime limit issue

  1. We have a requirement to set token session limit to 3 months. Is there any way we can do it?
    Note: refresh_token_lifetime_secs set to 3 months.
  2. On portal it's showing we can set session to 7 days and on document it's saying 1 day. Which one is right?
    User's image

User's image

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,449 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Navya 9,640 Reputation points Microsoft Vendor
    2024-09-12T02:57:23.5866667+00:00

    Hi @Ajay Gour

    Thank you for posting this in Microsoft Q&A.

    Unfortunately, it is not possible to set the token session limit to three months. The refresh token can only be set to a duration of three months (90 days). However, single-page applications that utilize the authorization code flow with PKCE are subject to a refresh token lifetime of 24 hours, whereas mobile applications, desktop applications, and web applications do not face this restriction.

    Session durations can be set for a maximum of one day and a minimum of five minutes. Documentation is correct.

    User's image

    The error message indicates a duration of more than one day. I will notify my team about this, and we will work on displaying the correct error message. Thank you for bringing this to our attention.

    For your reference: https://video2.skills-academy.com/en-us/azure/active-directory-b2c/configure-tokens?pivots=b2c-user-flow#token-lifetime-behavior

    Hope this helps. Do let us know if you any further queries.

    Thanks,

    Navya.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    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.