2
votes

I have a custom policy that is working fine. However, noticed that the Password Reset (Forgotten Password) link is not showing. How do I get this to show, as we are also working on a custom ui for the policy as well.

I'm using the self asserted method.

<ContentDefinition Id="api.selfasserted">
    <LoadUri>{Settings:CustomUIBaseUrl}/selfAsserted.html</LoadUri>
    <RecoveryUri>~/common/default_page_error.html</RecoveryUri>
    <DataUri>urn:com:microsoft:aad:b2c:elements:contract:selfasserted:2.1.0</DataUri>
    <Metadata>
        <Item Key="DisplayName">Collect information from user page</Item>
    </Metadata>
</ContentDefinition>

that's being referenced by this technical profile

<DisplayName>Local Account Signin</DisplayName>
    <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.SelfAssertedAttributeProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
    <Metadata>
        <Item Key="DisplayName">Signin</Item>
        <Item Key="SignUpTarget">SignUpWithLogonEmailExchange</Item>
        <Item Key="setting.operatingMode">Email</Item>
        <Item Key="setting.forgotPasswordLinkLocation">AfterLabel</Item>
        <Item Key="ContentDefinitionReferenceId">api.selfasserted</Item>
    </Metadata>
    <IncludeInSso>false</IncludeInSso>
    <InputClaims>
        <InputClaim ClaimTypeReferenceId="signInName" />
    </InputClaims>
    <OutputClaims>
        <OutputClaim ClaimTypeReferenceId="signInName" Required="true" />
        <OutputClaim ClaimTypeReferenceId="password" Required="true" />
        <OutputClaim ClaimTypeReferenceId="objectId" />
        <OutputClaim ClaimTypeReferenceId="authenticationSource" />
    </OutputClaims>
    <ValidationTechnicalProfiles>
        <ValidationTechnicalProfile ReferenceId="login-NonInteractive" />
    </ValidationTechnicalProfiles>
    <UseTechnicalProfileForSessionManagement ReferenceId="SM-AAD" />
</TechnicalProfile>
1
Hi,I tested the code you provided and thought it might be a problem with the {Settings:CustomUIBaseUrl},could you provide the 'CustomUIBaseUrl' file?and you can see this. stackoverflow.com/questions/58711221/… - Chauncy Zhou

1 Answers

0
votes

Use DATAURI: urn:com:microsoft:aad:b2c:elements:contract:unifiedssp:1.2.0 to have SignIn, SignUp and ForgotPassword in a single page.

When you click on Forgot Password you will get AADB2C90118 error code.

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

If Using .Net then you can refer this link to handle the error code: https://github.com/AzureADQuickStarts/B2C-WebApp-OpenIDConnect-DotNet-SUSI