Azure b2c - refresh token does not include custom claims

Sandeep Sagar 10 Reputation points
2024-07-03T01:10:22.43+00:00

When a user logs in, I hit a REST API that verifies the username and password and returns some properties like personId, comUsername, wcfToken, and organizationCode. These properties are then returned to the user as an access token.

This is how my Access token looks like on the initial login

enter image description here

but when I refresh token

const tokenRequest = {
  scopes: scopes,
  account: msalInstance.getActiveAccount(),
  forceRefresh: true,
} as SilentRequest;
console.log(await msalInstance.acquireTokenSilent(tokenRequest));

enter image description here

Why am I not receiving the expected claims? I heard something about persisted claims, but I'm not sure where exactly I have to write that code.

Windows for business Windows Client for IT Pros Directory services Active Directory
0 comments No comments
{count} votes

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.