Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

microsoft graph api - How to get MFA kind of id? (Azure B2C Custom Policy MFA)

I'm struggled with b2c custom policy. Does anyone know how to get MFA id via custom policy?

My app registers MFA phone-number via custom policy. After a user sign up. We would like to allow user to update their MFA phone number via our app. So I think MS-Graph is one option.(I know following article is beta-version.) But following article says that I need kind of "id" according to MFA phone-number.

https://docs.microsoft.com/en-us/graph/api/resources/phoneauthenticationmethod?view=graph-rest-beta

My questions are

  1. how to get id from via custom policy?
  2. Any other way to update MFA phone number via MS-graph?
question from:https://stackoverflow.com/questions/65872118/how-to-get-mfa-kind-of-id-azure-b2c-custom-policy-mfa

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

AD B2C custom policy and Microsoft Graph belong to completely different systems.

The id mentioned in MS Graph document can only be available in Microsoft Graph. There is no direct way to get it in Custom policy.

You need to call Microsoft Graph List phoneMethods somehow in Custom policy to get the MFA id by following Integrate REST API claims exchanges in your Azure AD B2C custom policy. (similar steps here)

But based on this post, it seems that if using Microsoft Graph, the format of the phone number is different with the one in Azure portal.

So you can choose to implement this sample Azure AD B2C: Edit MFA phone number suggested in that answer.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...