
QiF.70037 (Customer) asked a question.
I wrote the regex below in group attribute statement filter which returns all the groups a user is part of based on the group naming convention.
*H_DAM_.*|.*H_TOOLS_.*|.*H_ASSOCIATES.*
Sample output for a particular user:
H_DAM_TESTER
CDG_H_DAM_ADMIN
CDG_H_ASSOCIATES
Now, if i want Okta to remove "CDG_", so the output group names would start with H_ only, what would be the correct syntax for my regex?
Thanks

Hi @QiF.70037 (Customer) , Thank you for reaching out to the Okta Community!
I'm not seeing a way you can achieve this with multiple values involved. If it would have been just one group at a time, you could have used something like:
isMemberOfGroup(">insert group ID here<") ? "Desired Name for Group" : null
The syntax translates to " IF the user is a member of >insert group ID here< THEN send value "Desired Name for Group" OTHERWISE null "
In your case, you need to pull all the groups - these come as arrays, then the arrays need to be converted to strings so the values can be edited to the desired value, then converted back to arrays to be passed via the SAML assertion.
This is currently not supported.
For now, you can suggest a Feature Enhancement on the Okta Community page by going to the Community→ Ideas tab. Features suggested in our community are reviewed and can be voted and commented on by other members. High popularity will increase the likelihood of it being picked up by the Product Team and it being implemented.
More details here:
https://support.okta.com/help/s/blog/a674z000001cj7YAAQ/okta-ideas-faq?language=en_US
If my answer helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you.
Hope my answer helps!
--------------------------------
The Okta Community Catalysts Program is now live. Collect online badges when you participate in the Okta Help Center Questions community. Learn more here.