Hello, Trying to get a custom expression setup for the username field. How can I have the the string before the "@" form the email address replaced with the first part of the user.login? example:my email address is firstname.lastname@example.org and my user login is E71627@ge.coke.com. How can I have E71627@cokecce.com as custom username? Thank you.
In order to achieve this you will have to create the custom mapping using Profile Editor for your application. To do this login to your Admin Dashboard in Okta, navigate to Directory>Profile Editor>Application. Once you are on the Profile Editor for your application click on Mapp attributes, switch to the Okta to "Application" view and for the username click on Override with mapping and use the expression below. Before applying the expression you can preview this mapping for a user in the lower left side of the profile mappings window.
Please note you have 2 options to select from when applying this mapping. One is to "Apply mapping on user create only" and the other is "Apply mapping on user create and update". If you select the first one, any user currently assigned to the application will have to be unassigned and re-assigned back to the app for the "new" username to be applied. If you select the second option, if there are any updates to your users, the application username will be automatically updated to the new login.