
User16639620876595713400 (Customer) asked a question.
Hello,
I'm trying to make a SAML Custom Claim that will be used as a Display Name Tag for the app this allows access to for users.
I have figured this out on AZURE SAML, but for OKTA SAML I cannot find how do to the same task.
Basically, we have several AD Groups formated as
BTRS: Group Name Tag
In the App, we have a Display Name field were we have setup the Claims as
{DName} - {Name}
So if we have the following users:
Sam Banton
Sara Underhill
Joe Harrington
And groups:
BTRS: Group 1
BTRS: Better Group 2
If Sam and Joe are in Group 1, and Sarah is in Group 2
The results for the In App display name should be:
Group 1 - Sam Banton
Group 1 - Joe Harrington
Group 2 - Sara Underhill
Right now, this works in AZURE as intended with a Regex Pattern, and a separate Regex Replacement Pattern.
Regex Pattern: BTRS: (?<DName>.*)
REgex Replacement Pattern: {DName}
Is there a way to do an equivalent setup in OKTA SAML setup?
I've been going through the documentation on this along with reviewing forums; however, I am not finding an answer to this.
Any guidance would be of great help. =)

Hi @User16639620876595713400 (Customer) , Thank you for reaching out to the Okta Community!
If I'm understanding your use case correctly, you are trying to pass a custom attribute value to a downstream app via SAML assertion based on the user's group membership.
You might be able to achieve this with the Okta Expression Language using custom syntax.
Using the examples you gave, you can set up something like this:
isMemberOfGroupName("BTRS: Group 1") ? "Group 1 - " + user.firstName + " " + user.lastName : isMemberOfGroupName("BTRS: Better Group 2") ? "Group 2 - " + user.firstName + " " + user.lastName : null
*explanation of how the syntax works:
-evaluate the user's membership,
IF they are a member of the group called "BTRS: Group 1"
THEN (?)
send value "Group 1 - " and append the user's first name, a space (" ") and the user's last name
OTHERWISE (:)
IF they are a member of the group called "BTRS: Better Group 2"
THEN (?)
send value "Group 2 - " and append the user's first name, a space (" ") and the user's last name
OTHERWISE (:)
send null value.
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!
--------------------------------
Okta Identity Engine (OIE) Ask Me Anything: Get answers from product experts by clicking here.