azureazure-ad-b2c-custom-policytotp

Azure B2C custom policy Auth app - totpIdentifier issue



I have created a custom policy to use the Authenticator App from the following example code: https://github.com/azure-ad-b2c/samples/blob/master/policies/totp/policy/TrustFrameworkExtensions_TOTP.xml

The issue I am having is that it will sign up a new user, but when it is supposed to redirect to the page to show the QR code, it fails with the following error shown in AI.

Exception Message:A Claim of ClaimType with id "totpIdentifier" was not found, which is required by the ClaimsTransformationImpl of Type "Microsoft.Cpim.Data.Transformations.FormatStringMultipleClaimsTransformation" for TransformationMethod "FormatStringMultipleClaims" referenced by the ClaimsTransformation with id "CreateUriLabel" in policy xyz

The user is created correctly, as the next login will show the QR code and after going through the process, will give me my token.

I do understand the error, but I do not know how to fix it.
My guess is that the sequence of events is not correct, but "CreateUriLabel" should be called after "TotpFactor-Input" where "totpIdentifier" gets set.

Has someone got an idea on what to look at?


Solution

  • just for completion, it ended up being a branding file that was causing the issue.