'How to get/set Azure AD B2C User MFA details via Microsoft Graph API

Using the Microsoft Graph API v 1.0, how can I retrieve the user's MFA details?

For example, if I have an email based sign-in/sign-up policy with phone/SMS MFA, how can I see the phone number entered by the user? (and also set update it)

I know if I select 'identities' in the GET /users method I can see the email they've signed up with, but not the phone number they set for MFA. (https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0)

Of course I'm looking for all the mfa settings: mfa phone number, mfa email address, is mfa set, etc.

Hopefully there is some kind of extension attribute that contains this that I can select, and set on creation, but I cannot find documentation on this.

[UPDATE] In the Azure portal, I can see the entered data if I go to user > profile > authentication methods. So I tried accessing the authentication relationships on the user. but it didn't provide any details (all empty arrays) https://docs.microsoft.com/en-us/graph/api/resources/authentication?view=graph-rest-1.0



Solution 1:[1]

There's a write-up here.

e.g:

GET https://graph.microsoft.com/beta/users/objectID/authentication/methods

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rbrayb