Issue with passing locale to Claim Transformation

Soni, Ashish 21 Reputation points

Hi @Shweta Mathur @AmanpreetSingh-MSFT ,

Could you please help me with below issue?

We are using custom email service to send OTP for email verification. In order to achieve this, we are using ClaimTransformation to generate JSON request for the custom service.

In Extensions file, ClaimTransformation looks like this:

When we try sending the request, our service gets only "en" as request. Expectation is to recieve a json request with email, otp and locale value. Other fields are not present in request.

Could you please confirm what am I doing wrong here?



Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,672 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Shweta Mathur 28,021 Reputation points Microsoft Employee

    Hi @Soni, Ashish ,

    Thanks for reaching out.

    I understand you are trying to get claim values ('email', 'otp') or constants ('en') to generate a JSON string but only getting locale value in the JSON.

    To get claim values and constants to generate a JSON string, you need to add JSON objects to JSON array following dot notation which is used to indicate where to insert the data into a JSON string.

          <ClaimsTransformation Id="GenerateEmailRequestBody" TransformationMethod="GenerateJson">
              <InputClaim ClaimTypeReferenceId="email" TransformationClaimType=""/>
              <InputClaim ClaimTypeReferenceId="otp" TransformationClaimType="value.0.otp"/>
              <InputParameter Id="value.1.language" DataType="string" Value="{Culture:RFC5646}"/>
              <OutputClaim ClaimTypeReferenceId="emailRequestBody" TransformationClaimType="outputClaim"/>
      "value": [
          "email": "",
          "otp": "123456"
          "language": "en"

    Hope this will help.



    Please remember to "Accept Answer" if answer helped you.

    0 comments No comments