1

I need to display a custom message after the code is sent in the password reset flow, I have tried following this https://learn.microsoft.com/en-us/azure/active-directory-b2c/string-transformations#formatlocalizedstring but it does not work. I am doing the following, very similar to the reference.

I add the same claimTransformation

<ClaimsTransformation Id="SetResponseMessageForOTPSent" TransformationMethod="FormatLocalizedString">
        <InputClaims>
          <InputClaim ClaimTypeReferenceId="email" />
        </InputClaims>
        <InputParameters>
          <InputParameter Id="stringFormatId" DataType="string" Value="ResponseMessage_EmailExists" />
        </InputParameters>
        <OutputClaims>
          <OutputClaim ClaimTypeReferenceId="responseMsg" TransformationClaimType="outputClaim" />
        </OutputClaims>
      </ClaimsTransformation>

And the localized string

<LocalizedString ElementType="FormatLocalizedStringTransformationClaimType"  StringId="ResponseMessage_EmailExists">Code sent to "{0}"</LocalizedString>

Finally I refer to the claimTransformation from a technicalProfile

<TechnicalProfile Id="SendOtp">
          <DisplayName>Send Otp</DisplayName>
          <Protocol Name="Proprietary" Handler="Web.TPEngine.Providers.RestfulProvider, Web.TPEngine, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />
          <Metadata>
            <Item Key="ServiceUrl">Url</Item>
            <Item Key="AuthenticationType">ApiKeyHeader</Item>
            <Item Key="SendClaimsIn">Body</Item>
            <Item Key="ContentDefinitionReferenceId">api.localaccountpasswordreset</Item>
          </Metadata>
          <InputClaims>
            <InputClaim ClaimTypeReferenceId="email" />
          </InputClaims>
          <OutputClaimsTransformations>
            <OutputClaimsTransformation ReferenceId="SetResponseMessageForOTPSent" />
          </OutputClaimsTransformations>
        </TechnicalProfile>

But it doesn't work, it always shows the message "Unable to validate the information provided". What am I doing wrong?

Pedro
  • 37
  • 3
  • You need to troubleshoot the policy. "Unable to validate the information provided" means that one of the technical profiles has failed to execute because its misconifgured. See [this](https://learn.microsoft.com/en-us/azure/active-directory-b2c/troubleshoot?pivots=b2c-custom-policy#troubleshooting-with-application-insights) to help find logs and the cause of the issue. – Jas Suri - MSFT Jan 24 '22 at 17:16
  • I have set the traces in vscode, but for that problem I don't get the error, just the normal information. If the technical profile is the issue, do you know which one I should use to reference that claim transformation? Thanks. – Pedro Jan 24 '22 at 18:18

0 Answers0