Self Service Password Reset prompts for email verification again?

JL 51 Reputation points
2021-07-15T12:01:27.647+00:00

I'm following this example to implement self-service password reset:

https://github.com/azure-ad-b2c/samples/tree/master/policies/embedded-password-reset

I was able to get the password reset working (prompt for email, verify email, change password, redirect to jwt.ms)

When I try it again (without prompt=login), I was expecting to be redirected to the reply url (jwt.ms) since there should now be a session.

Instead, I'm immediately redirected to the "Verification is necessary" email dialog again.

114958-b2c-prompt-email.png

I'm guessing it's because of the "isForgotPassword" claim?

How can I fix this?

Thanks
JL

Edit 1

No luck with the PasswordResetUsingEmailAddressExchange.
If I add make these changes, it seem to work.
But not sure if it's an ideal solution.
Can anyone review/comment on the solution?

   <!-- extend email discovery (discover/verify email) to use session management -->  
   <TechnicalProfile Id="LocalAccountDiscoveryUsingEmailAddress">  
     <UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD" />  
   </TechnicalProfile>  
     
   <!--   
     not technically needed.  
     but in my custom policy, I also have MFA subjourney  
     so I'm using this to skip MFA subjourney  
     (can't use objectId, because a successful login would   
     already set that claim)  
     -->  
   <TechnicalProfile Id="SM-AAD">  
     <PersistedClaims>  
       <PersistedClaim ClaimTypeReferenceId="isForgotPassword" />  
     </PersistedClaims>  
   </TechnicalProfile>  
   </TechnicalProfiles>  
     
   <OrchestrationStep Order="3" Type="InvokeSubJourney">  
     <Preconditions>  
     
       <!-- add start: if objectId is found (from session), skip subjourney -->  
       <Precondition Type="ClaimsExist" ExecuteActionsIf="true">  
         <Value>objectId</Value>  
         <Action>SkipThisOrchestrationStep</Action>  
       </Precondition>  
       <!-- add end-->  
     
       <Precondition Type="ClaimsExist" ExecuteActionsIf="false">  
         <Value>isForgotPassword</Value>  
         <Action>SkipThisOrchestrationStep</Action>  
       </Precondition>  
     </Preconditions>  
     <JourneyList>  
       <Candidate SubJourneyReferenceId="PasswordReset" />  
     </JourneyList>  
   </OrchestrationStep>  
Microsoft Security | Microsoft Entra | Microsoft Entra External ID
{count} vote

2 answers

Sort by: Most helpful
  1. Jitendra Rai 231 Reputation points
    2021-07-22T07:00:25.4+00:00

    Thanks and could you please update the <Item Key="EnforceEmailVerification">false</Item> into the ForgotPassword technical profile (<TechnicalProfile Id="ForgotPassword">) of the policy file.

    Please refer more about the EnforceEmailVerification metadata document here. (https://learn.microsoft.com/en-us/azure/active-directory-b2c/disable-email-verification?pivots=b2c-custom-policy)


  2. James Hamil 27,221 Reputation points Microsoft Employee Moderator
    2021-07-22T17:29:10.283+00:00

    Hi @JL2345 , it looks like there is an issue on our end with SSO cookies. We're looking into a resolution now. In the meanwhile please try what Jitendra suggested and let us know if that helps.

    Best,
    James


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.