question

GrgoryD-6812 avatar image
0 Votes"
GrgoryD-6812 asked GrgoryD-6812 edited

Azure AD B2C custom verification code email localization content

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
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hey @GrgoryD-6812 we're currently looking into this further and will let you know once we have some documentation/examples. For future readers the document being referred to is located here : https://docs.microsoft.com/en-us/azure/active-directory-b2c/custom-email#make-a-reference-to-the-displaycontrol

0 Votes 0 ·

1 Answer

FrankHuMSFT-3200 avatar image
0 Votes"
FrankHuMSFT-3200 answered GrgoryD-6812 edited

Hey @GrgoryD-6812,

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.









· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is it possoble to send verification codes via another provider rather than Microsoft?

Thanks.

Joao Paulo.

0 Votes 0 ·

Hi,

thanks for your answer and example. I will try it.

sorry for my late answer but I haven't receive any notification with your reply :'(

regards

0 Votes 0 ·