How to programmatically (or manually by using user flow for edit) change validated email while using signup sign in flow with sign in type is username in Azure AD B2C
I have set up the signup sign in flow in Azure B2C using recommended version and use Local accounts User ID signup option, which in the flow, user have to validated email before sign up.
First, I tried to retrieve validated email from Graph API which is not in user Identities
"Identities": [
{
"AdditionalData": {},
"BackingStore": {
"InitializationCompleted": false,
"ReturnOnlyChangedValues": false
},
"Issuer": "xxxxx.onmicrosoft.com",
"IssuerAssignedId": "testuser",
"OdataType": null,
"SignInType": "userName"
},
{
"AdditionalData": {},
"BackingStore": {
"InitializationCompleted": false,
"ReturnOnlyChangedValues": false
},
"Issuer": "xxxxx.onmicrosoft.com",
"IssuerAssignedId": "xxxxx.onmicrosoft.com",
"OdataType": null,
"SignInType": "userPrincipalName"
}
],
but I finally found the validated email was in EmailAuthenticationMethod but I can't update it via Graph API (error as below)
Microsoft.Graph.Models.ODataErrors.ODataError: Exception of type 'Microsoft.Graph.Models.ODataErrors.ODataError' was thrown. at Microsoft.Kiota.Http.HttpClientLibrary.HttpClientRequestAdapter.ThrowIfFailedResponse(HttpResponseMessage response, Dictionary`2 errorMapping, Activity activityForAttributes)
In which in this thread, Alfredo said the user is not consumer account, which make me confuse because it was create by default signup signin flow and even manually created user
(user info in Azure AD B2C)
(When I manually created)
It will be perfect if user validated email can be update programmatically, or any user flow which can edit this email will be welcome.
Thanks.