Verify email address using AD B2C?

I have a section of our site where a user can edit the email address they use to sign in. I think it would be a good idea to also have the user enter a verification code to ensure that the email address they entered is not only correct, but also just generally valid.

I know B2C allows me to issue a Graph API request that will modify the identities property with a patch request as such:

{
    "identities":  [
        {
            "signInType": "emailAddress",
            "issuer": "contoso.onmicrosoft.com",
            "issuerAssignedId": "newemail@email.com"
        }
    ]
}

And this generally works to detect conflicting emails and so on. But is it possible to programmatically trigger B2C to send out a verification email or does such an infrastructure have to be built out by us?

1 answer

  • answered 2020-10-16 12:07 Jas Suri - MSFT

    The only way to do email verification is through a Azure AD B2C User Flow or Custom Policy. You can see how this works in the Sign In/Up User Flow.

    AAD B2C service does not expose an API endpoint to send out a verification code.