Azure AD RegEx claims type transformation rule for SAML applications

Thangaraj Lakshmanan 185 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 ******@contoso.com to ******@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

Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Microsoft Entra | Microsoft Entra ID
Microsoft Security | Microsoft Graph
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 47,901 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 = '******@contoso.com'
    $u -replace $from,$to
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.