SAML 2.0 Template Application - Application username format with custom formula Skip to main content
https://support.okta.com/help/answers?id=906f0000000bltsiai&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:
Michael CizmarMichael Cizmar 

SAML 2.0 Template Application - Application username format with custom formula

I'm using the SAML 2.0 Template and have created a custom formula for the Application Username.  It looks like the template doesn't send this.  Is that expected?

Formula:
${f:toLowerCase(user.firstName)}.${f:toLowerCase(user.lastName)}@domain

The assertion is sent with the okta username.
Thomas KirkThomas Kirk (Okta, Inc.)
If the application was already assigned to a user before the change was made, you will need to un-assign the app and re-assign. The change in username mapping doesn't update the existing assignments username field.

Thomas Kirk, Technical Consultant, Okta
Michael CizmarMichael Cizmar
Thanks.  I'll try that.
Lawrence YorkLawrence York (Okta, Inc.)
Hi Michael, Your formula appears to be correct.

I'm not sure if you are testing with a new app or updating an existing one but here are a few suggestions.

First, I would double check that you are indeed hitting the correct application where you defined the custom expression. This is sometime an easy mistake to make.

Next, you may also want to check that the Application username is not being overwritten in the Profile Editor. Go to Directory > Profile Editor > Profile Mappings > {{Appplication}} > Okta to {{Application}} and check to see if the username is being overriden. If it says "Username set by {{Application}}" then it is not being overriden. 

Lawrence York, Sr. Technical Consultant, Okta