Azure B2C force login after password reset sub journey

Rahil Momin 1 Reputation point
2022-05-23T03:10:49.817+00:00

we're using password reset sub-journey as described here (https://learn.microsoft.com/en-us/azure/active-directory-b2c/add-password-reset-policy?pivots=b2c-custom-policy#self-service-password-reset-recommended).

When using this, a user is automatically logged upon successful password reset flow. We want to stop that and redirect user to sign-in page after successful password reset.

How can we achieve this, here is what main journey looks like:

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,999 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. 2022-05-31T18:31:43.93+00:00

    Hello @Rahil Momin , in order to redirect user to sign-in page after successful password reset and orchestration step you have to insert a new orchestration step that calls the SelfAsserted-LocalAccountSignin-Email technical profile. Avoid any preconditions to make it run all the time.

    Let us know if this answer was helpful to you or if you need additional assistance. If it was helpful, please remember to accept it so that others in the community with similar questions can more easily find a solution.


  2. Rob 26 Reputation points
    2022-12-21T18:17:25.233+00:00

    Hi @Alok Aswal

    For the ContentDefinition, I'm using my own custom HTML page, so I create my own ContentDefinition(api.passwordReset_Success) and it will be something like this:

    <ContentDefinition Id="api.passwordReset_Success">  
        
     <LoadUri>https://mywownwebsite.net/templates/en/passwordresetSuccess.html</LoadUri>  
     <RecoveryUri>~/common/default_page_error.html</RecoveryUri>  
     <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.1.7</DataUri>  
     <Metadata>  
       <Item Key="DisplayName">Password Changed</Item>  
     </Metadata>  
    </ContentDefinition>  
    

    And my passwordresetSuccess.html will look like this:

    <html>  
    <head>  
      <style>  
        #newPassword_label,  
        #justResetPassword_label,  
        #cancel,  
        #continue {  
          display: none;  
        }  
      </style>  
    </head>  
    <body>  
      <div class="container">  
        <div class="content">  
          <h1 id="headline">  
            Success! Your password has been reset.  
          </h1>  
          <div class="buttons"><button id="signIn" onclick="goBack()">Sign in</button></div>  
          <div id="api" data-name="SelfAsserted" role="main"></div>  
        </div>  
      </div>  
      
      <script>  
        function goBack() {  
          history.back();  
        }  
      </script>  
    </body>  
    </html>  
    
    0 comments No comments