Azure B2C You are already registered, please press the back button and sign in instead

Viewed 73

I have created a custom B2C_1A_SIGNUP_SIGNIN Policy.

Used Google Authentication.

When I hit the create button mypersonaltenantid gets validated through a Azure Function.

I am presented the error message You already registered, please press back button and sign in instead.

enter image description here

Before executing this policy i made sure this user does not exist-

After the error message is displayed i look inside B2C: The user was created incl. my custom claim with value mypersonaltenantid.

I was assuming that i am transferred to a different page after signup. Is this assumption wrong?

1 Answers

Created a Issue and got the final hint.

Looks like a action was performed twice. In my case I had a Base policy and a extension policy which had a ValidationTechnicalProfiles section.

Base.xml

<ValidationTechnicalProfiles>
    <ValidationTechnicalProfile ReferenceId="AAD-UserWriteUsingAlternativeSecurityId" />
</ValidationTechnicalProfiles>

Extension.xml

<ValidationTechnicalProfiles>
    <ValidationTechnicalProfile ReferenceId="REST-ValidateTenantId" />
    <ValidationTechnicalProfile ReferenceId="AAD-UserWriteUsingAlternativeSecurityId" />
</ValidationTechnicalProfiles>

My assumption after both files get merged:

<ValidationTechnicalProfiles>
    <ValidationTechnicalProfile ReferenceId="REST-ValidateTenantId" />
    <ValidationTechnicalProfile ReferenceId="AAD-UserWriteUsingAlternativeSecurityId" />
</ValidationTechnicalProfiles>

But it looks like the merge is performed like this:

<ValidationTechnicalProfiles>
    <ValidationTechnicalProfile ReferenceId="REST-ValidateTenantId" />
    <ValidationTechnicalProfile ReferenceId="AAD-UserWriteUsingAlternativeSecurityId" />
    <ValidationTechnicalProfile ReferenceId="AAD-UserWriteUsingAlternativeSecurityId" />
</ValidationTechnicalProfiles>

Of course that explains why AAD write is performed twice.

From my point of view the error message is quite misleading.

Related