Need to pass a substring of Okta groups name on SAML assertion

Hello,

I need to pass a substring of the group names on the SAML assertion.
For instance:
MyApp is my my SAML application in Okta
These groups are assigned to MyApp:
MyApp-groupa
MyApp-groupb
I need to pass on the SAML assertion just the substring of groups as roles
roles{groupa,groupb}
The problem I am having is that if I try to configure an assertion attribute to be passed, the group object does not seem to be available for me to manipulate groupname and get the substring.
Looks like I can only access user object on the Assertion attribute.
Then I tried creating a custom application attribute on the profile editor, but I am have not been able to get group information there either.
I tried this on the custom attribute mapping.
created a string array attribute for the app user profile.
mappping this just to see if I can get the list of groups there and I get an error.
Arrays.flatten(Arrays.toCsvString(getFilteredGroups(“MyApp",“group.name”,40)).String.substringAfter("-"))

Invalid expression syntax Arrays.flatten(Arrays.toCsvString(getFilteredGroups(“MyApp",“group.name”,40)).String.substringAfter("-"))

I also tried this just to see if I could get the list of groups into this customr role attribute but it also did not work.
getFilteredGroups(“MyApp",“group.name”,40)

Anyone has an idea if it is possible to populate an application profile custom attribute with the list of groups the user has been assigned?

Thanks in advance,

Please open a support ticket through an email to support@okta.com with this issue. One of our Support Engineers will be happy to assist you further.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.