Search code examples
azureazure-ad-b2cazure-ad-b2c-custom-policy

Azure AD B2C detecting Social signups on the reset password page


I need to check emails being entered on our "reset password" to see if the user used a Social IDP to sign up. I would then be able to inform the user that they cannot reset the password for that type of account through Azure. At the moment it only tells them that we cannot find their account, I can change the messaging here but it's not sufficient in this case.


Solution

  • If you use a social IDP then:

    <OutputClaim ClaimTypeReferenceId="authenticationSource" DefaultValue="socialIdpAuthentication" AlwaysUseDefaultValue="true" />
    

    So look at the "authenticationSource".

    Update

    e.g.

    <Precondition Type="ClaimEquals" ExecuteActionsIf="true">
        <Value>authenticationSource</Value>
        <Value>socialIdpAuthentication</Value>
        <Action>SkipThisOrchestrationStep</Action>
    </Precondition>