How to trim a character in Azure AD SAML claims

Akshay 0 Reputation points

I have a SAML application which is using emailaddress claim. I have some users who have ' (single quote) in their email addresses and I would like to remove through claim transformations.

For example**'** should be sent as in SAML assertion.

As per the MS official claim transformations article, it may be possible through regexreplace() but the syntax looks so confusing. Can this be achieved at all?

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

1 answer

Sort by: Most helpful
  1. Shweta Mathur 19,946 Reputation points Microsoft Employee

    Hi @Akshay

    Thanks for reaching out.

    You can use the regexReplace() function to transform the mail address.

    You can use below regax to remove the single Quote and concatenate the email address.


    User's image

    Hope this will help.



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

    0 comments No comments