Create a REGEX with EntraID to extract informations from group with multiples transformations for SAML Token

Anonymous
2024-09-18T16:01:39.1266667+00:00

Hello,

We have a group in our Azure AD we want to extract the end to send in a SAML Token as attribute.

Let say we have this group: GRP-AppName-RoleName1-SubRoleName2

We wan to extract what is after "GRP-AppName-" --> RoleName1-SubRoleName2

And also put the result in lowercase and replace the - with a .

Meanning we want the end result to be rolename1.subrolename2

We dit the following test with RegexReplace()

User's image But the result is RoleName1-SubRoleName2 and we don't know how to put the result in lowercase and replace the - with .

Currently we are doing this with our current SAML Identity Provider Siteminder with the following REGEX

TRANSLATE(LCASE(ENUMERATE(memberOf,AFTER(RDN(STRING(%0)),'GRP-AppName-',TRUE))),"-",".")

How can we achieve this with the EntraID Regex?

Thanks

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} votes

Your answer

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