question

KaranShah-5232 avatar image
0 Votes"
KaranShah-5232 asked ·

Azure Active Directory B2C: Add Forgot password Link in my custom sign in policy

I want to add forgot password link in my custom sign in policy for local accounts. but I am not able to get any proper document for this particular scenario.

azure-ad-b2c
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

amanpreetsingh-msft avatar image
0 Votes"
amanpreetsingh-msft answered ·

Hi @KaranShah-5232 · Thank you for reaching out.

The Forgot password Link is by default included in all the templates of Custom Policy Starter Pack. If you have already implemented the starter pack, make sure setting.forgotPasswordLinkLocation Metadata key is NOT present under TechnicalProfile Id="LocalAccountSignUpWithLogonEmail" or TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email" as mentioned below:

 <TechnicalProfile Id="SelfAsserted-LocalAccountSignin-Email">
     ...
     <Metadata>
     <Item Key="setting.forgotPasswordLinkLocation">None</Item>

setting.forgotPasswordLinkLocation : Displays the forgot password link. Possible values: AfterLabel (default) displays the link directly after the label or after the password input field when there is no label, AfterInput displays the link after the password input field, AfterButtons displays the link on the bottom of the form after the buttons, or None removes the forgot password link.

Read more: https://docs.microsoft.com/en-us/azure/active-directory-b2c/self-asserted-technical-profile


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

· 5 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It's not worked still.

I am using the following configuration for content 72787-image.pngin my extension file.


If I am changing datauri to : urn:com:microsoft:aad:b2c:elements:contract:unifiedssp:1.2.0. it is working but user interface is different,in that there is no round corner buttons and all. so

0 Votes 0 ·
image.png (63.7 KiB)

Hi @KaranShah-5232 · Could you please share the exact value of the DataURI it doesn't work with?

0 Votes 0 ·
KaranShah-5232 avatar image KaranShah-5232 amanpreetsingh-msft ·

urn:com:microsoft:aad:b2c:elements:contract:selfasserted:1.2.0

0 Votes 0 ·
Show more comments
amanpreetsingh-msft avatar image
0 Votes"
amanpreetsingh-msft answered ·

Hi @@KaranShah-5232 · You need to specify unifiedssp:1.2.0 under <ContentDefinition Id="api.signuporsignin"> because the forgot your password link appears on the Signup/Sign in combined or Sign in only page; the content of which is populated by api.signuporsignin and the DataUri for that should be ending with unifiedssp:1.2.0. The page contract selfasserted:1.2.0 should used for pages that gather information from the users, e.g., api.selfasserted, api.selfasserted.profileupdate, api.localaccountsignup, and api.localaccountpasswordreset.

Below is the XML snippet of which DataUri should be specified under which ContentDefinition Id for your reference.

 <ContentDefinitions>
   <ContentDefinition Id="api.error">
     <DataUri>urn:com:microsoft:aad:b2c:elements:contract:globalexception:1.2.0</DataUri>
   </ContentDefinition>
   <ContentDefinition Id="api.idpselections">
     <DataUri>urn:com:microsoft:aad:b2c:elements:contract:providerselection:1.2.0</DataUri>
   </ContentDefinition>
   <ContentDefinition Id="api.idpselections.signup">
     <DataUri>urn:com:microsoft:aad:b2c:elements:contract:providerselection:1.2.0</DataUri>
   </ContentDefinition>
   <ContentDefinition Id="api.signuporsignin">
     <DataUri>urn:com:microsoft:aad:b2c:elements:contract:unifiedssp:1.2.0</DataUri>
   </ContentDefinition>
   <ContentDefinition Id="api.selfasserted">
     <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:1.2.0</DataUri>
   </ContentDefinition>
   <ContentDefinition Id="api.selfasserted.profileupdate">
     <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:1.2.0</DataUri>
   </ContentDefinition>
   <ContentDefinition Id="api.localaccountsignup">
     <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:1.2.0</DataUri>
   </ContentDefinition>
   <ContentDefinition Id="api.localaccountpasswordreset">
     <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:1.2.0</DataUri>
   </ContentDefinition>
   <ContentDefinition Id="api.phonefactor">
     <DataUri>urn:com:microsoft:aad:b2c:elements:contract:multifactor:1.2.0</DataUri>
   </ContentDefinition>
 </ContentDefinitions>

Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.