Azure AD B2C custom verification code email localization content

Grégory D 1 Reputation point
2020-01-29T10:13:48.917+00:00

Hi,

I use custom policy to send a custom email verification code with sendgrid.

It is ok to create an email template and pass custom value to manage the content of the email by using "InputParameter" of "ClaimsTransformation".

However, I cannot manage the localization of the content of the email template or change the "value" of the "InputParameter" of "ClaimsTransformation".

In the documentation it says that this is possible.

Where can I find an example or find way to do it ?

thanks for your help

Azure Active Directory
Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
12,668 questions
{count} votes

1 answer

Sort by: Most helpful
  1. FrankHu-MSFT 971 Reputation points
    2020-02-06T20:29:27.603+00:00

    Hey @Grégory D ,

    There is currently an Azure doc being written up and will be released as soon as possible,
    Here is a small sample on how to do this using a b2c claims transformation policy,

    Copies localized strings into claims.

    | Item | TransformationClaimType | Data Type | Notes |
    | OutputClaim | The name of the localized string | string | List of ClaimType that is produced after this ClaimsTransformation has been invoked. |

    The following example looks up the email subject, body, your code message, and the signature of the email, from localized strings. These claims later used by custom email verification template. You first need to define a localization string and associate it with a self-asserted technical profile. The following code snippet defines the string collection for English (default) and Spanish. The ElementType of the LocalizedString element is a reference to your claims transformation Id (see following sample).

    https://gist.github.com/FrankHu-MSFT/303a008abe26dc06223e79b23daf0613

    Then in the claims transformation you specify the list of claims ot be set with localized string. "ClaimTypeReferenceId" is a reference to a ClaimType already defined in the ClaimsSchema section in the policy. The "TransformationClaimType" is the name of the localized string as defined in the "StringId" of the "LocalizedString"

    Please let us know if this is helpful, and keep a look out for the official document for further help.