0
votes

We have a scenario where a logged-in user (SFA, authentication has been done by Azure policies) needs to do some high-value transactions. To allow this, we need to throw an additional authentication challenge. (MFA) If the user access was successful we need to enrich the token somehow to read in on the client-side. Tried to use scopes for this scenario but as they set per application couldn't make it happen, any thoughts on how it can be implemented in Azure b2c?

Thanks

1

1 Answers

0
votes

The usual approach is for the application to look at the "acr" claim. This claim tells the app which B2C Auth policy the user has last arrived with. Therefore, in your app implement this logic:

  1. User clicks high risk item
  2. App checks current token "acr" claim
  3. If acr != "B2C_1_MFA", then redirect the user to authenticate via a sign in/up policy that has MFA enabled

You need to create a sign in/up policy with MFA enabled and the above logic to get this to work. The App only needs to know about the policy name to know if the authentication challenges have been satisfied.

If the user has already logged in when this B2C policy is executed, the built in Single Sign On will skip the user having to enter their credentials again, and instead will just need to complete the MFA step.