Azure AD RegEx claims type transformation rule for SAML applications

Thangaraj Lakshmanan 165 Reputation points
2023-04-07T11:29:04.46+00:00

I have multiple apps that have UPN as useridentifier and various different additional claims.  Trying to apply transform rule to transform from user@contoso.com to user@abc.com for useridentifier attribute without changing the other attributes. In below article mentioned the steps but I am looking for PowerShell command or Microsoft Graph PowerShell to perform the activity on multiple apps. https://learn.microsoft.com/en-us/answers/questions/1167244/azure-ad-claims-transformation-of-upn

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,445 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,328 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,629 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 45,906 Reputation points
    2023-04-09T19:19:27.2466667+00:00

    I don't know about 'claims', but if all you want is a regex to substitute one value for another, try this:

    $from = '@contoso\.com'
    $to ='@abc.com'
    $u = 'user@contoso.com'
    $u -replace $from,$to
    
    0 comments No comments