Search code examples
azurelocalizationazure-ad-b2cazure-ad-b2c-custom-policy

Localize Azure B2C error message 'A user with the specified credential could not be found' error message'


I am writing a custom policy for reset password on Azure B2C. When the user tries to reset password on an account that doesn't exist, this message shows up: 'A user with the specified credential could not be found' error message'.

As per the documentation here: https://learn.microsoft.com/en-us/azure/active-directory-b2c/localization, I would like to localize this error message. Perhaps something like this:

<LocalizedString ElementType="ErrorMessage" StringId="UserMessageIfVerificationFailedNoRetry">Some localized string</LocalizedString>

but in this case, the trouble is I don't know what the StringId of the error message is, and I can't find it anywhere in the documentation.

The error message does appear here: https://learn.microsoft.com/en-us/azure/active-directory-b2c/error-codes, but how would one translate the error code to a StringId?

Any help would be much appreciated.

error message on azure b2c showing 'A user with the specified credential could not be found'


Solution

  • You can try like this

    String ID

    UserMessageIfClaimsPrincipalDoesNotExist: We can't seem to find your account.

    forgotpassword_link : forgot password

    For more string ID's Please refer this