Refresh Token API or KMSI-Redirect to /authorise

Komal Singh 0 Reputation points
2024-01-03T12:19:11.3933333+00:00

In the context of an E-Commerce end-user experience with Keep Me Signed In (KMSI) enabled:

  1. What is the relationship between KMSI and the Refresh Token API?
  2. Should I use the Refresh Token API or implement a silent login? Does silent login redirect to Azure AD B2C? What is the recommended approach for a seamless e-commerce experience?
  3. If KMSI expires, what should be the strategy? Should I still call the Refresh Token API? Will it result in an error, or can I refresh the token even after KMSI expiration?

I'm feeling a bit confused about the proper implementation. Should I rely on the Refresh Token API or continue with the redirect to the ADB2C/authorize call?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    2024-01-03T17:16:45.73+00:00

    Hi @Komal Singh ,

    1. the relationship between KMSI and the Refresh Token API is that they both allow users to remain signed in to your application. KMSI enables users to remain signed in even after they close the browser, while the Refresh Token API allows users to obtain a new access token and refresh token pair after the current access token has expired.
    2. For a seamless e-commerce experience, it is recommended to use KMSI and implement a silent login using the Refresh Token API. Silent login does not redirect to Azure AD B2C, but instead uses the Refresh Token API to obtain a new access token and refresh token pair without prompting the user to enter their credentials. This approach provides a seamless experience for the user and allows them to remain signed in to the application even after the access token has expired.
    3. If KMSI expires, the recommended strategy is to call the Refresh Token API to obtain a new access token and refresh token pair. This will allow the user to remain signed in to the application without being prompted to enter their credentials again. Calling the Refresh Token API after KMSI expiration will not result in an error, and you can refresh the token even after KMSI expiration.

    For a seamless e-commerce experience, it is recommended to use KMSI and implement a silent login using the Refresh Token API. If KMSI expires, you should call the Refresh Token API to obtain a new access token and refresh token pair. More info here.

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

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James


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.