Using expressions in SAML attributes? Skip to main content
https://support.okta.com/help/answers?id=906f0000000i05xias&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fanswers
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Ask Search:
Chris WalkerChris Walker 

Using expressions in SAML attributes?

I want to send an attribute in Attribute Statements section of SAML setup. I have this:

username  unspecified  ${f:substringBefore(user.email, “@”)}

And Okta won't accept it. What am I doing wrong? (The SP won't accept NameID as the username, only an attribute 'username').
Raja NejemRaja Nejem (Okta, Inc.)
You can follow this link for how to set expressions:

http://developer.okta.com/docs/api/getting_started/okta_expression_lang.html#referencing-user-attributes
 
Isaac BrumerIsaac Brumer
Hi:

I have a similar question. The document referenced in this thread covers Okta expressions in app profiles (i.e., Universal Directory/Profile Editor) The question is about using expressions in SAML attribute statements, which may be different.

Any updates?

Thank you,
Adam BergstromAdam Bergstrom
If you still need it... String.substringBefore(user.email,"@")