b2c + msaljs acquireTokenSilent does not execute custom policy?

JL 51 Reputation points
2021-09-28T10:26:38.54+00:00

I have a b2c sign in custom policy (which calls a REST API Connector)

In my spa app, I can sign in successfully (using msaljs 2).

But if I then call msalInstance.acquireTokenSilent(), it does not run through the custom policy again (ie, does not call my REST API Connector)

Calling either msalInstance.acquireTokenRedirect or msalInstance.acquireTokenPopup runs through the custom policy as I expected.

I have tried passing in forceRefresh, but no luck

msalInstance.acquireTokenSilent({ scopes, forceRefresh: true })

Is there any way to force acquireTokenSilent to run through the custom policy again, without requiring a popup/redirect?

Thanks

Microsoft Security | Microsoft Entra | Microsoft Entra External ID
Microsoft Security | Microsoft Entra | Microsoft Entra ID
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.