ADB2C | Custom Policies and Refresh Token

Abhay Chandramouli 1,056 Reputation points
2023-09-05T15:37:01.1233333+00:00

Hi,

We have a login form which is the custom policy page on ADB2C. The login form has a Keep me signed in checkbox.

After logging in, the custom policy provides us an access token and refresh token. The checkbox value : true or false is send as part of a claim in the token.

so the access token has the claim "checkbox" as "true" when checked.

Now, when I hit the refresh token api, I get another refresh token and access token. This time the access token has the "checkbox" value as "false" - but the expected value is the same which should be "true"

Can you let me know how to achieve this ?

Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

3 answers

Sort by: Most helpful
  1. Alfredo Revilla - Upwork Top Talent | IAM SWE SWA 27,526 Reputation points Moderator
    2023-09-06T04:45:39.44+00:00

    Hello @Abhay Chandramouli , the Azure AD B2C KMSI (keep me signed in) checkbox state is available only during interactive authentication requests. Requesting new tokens using a refresh token is done in a non-interactive way and thus will always return a false value for the aforementioned KMSI claim.

    One potential woraround would involve adding a refresh token journey to your Custom Policy, passing the original issued token (with the KSMI claim set to true) as a query param, read it using claims resolvers, decoding it using a custom API and outputing the original KSMI value.

    Let us know if you need additional assistance. If the answer was helpful, please accept it and rate it so that others facing a similar issue can easily find a solution.

    1 person found this answer helpful.

  2. khov vannak 0 Reputation points
    2023-10-14T07:23:16.3033333+00:00

    your text

    0 comments No comments

  3. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.