
j5v7c (j5v7c) asked a question.

We use cookies to provide the best website experience and to help understand marketing efforts. We may also share data with ad partners to reach potential customers across the web. To learn more, visit our Privacy Policy. Click here for Your Privacy Choices. You may also opt out of this sharing by signaling your preference via GPC, applicable only to the browser signaling the opt-out.
More information
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Select All

We use cookies to provide the best website experience and to help understand marketing efforts. We may also share data with ad partners to reach potential customers across the web. To learn more, visit our Privacy Policy. Click here for Your Privacy Choices. You may also opt out of this sharing by signaling your preference via GPC, applicable only to the browser signaling the opt-out.
More information
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Select All
By now you’ve no doubt heard about Okta’s Universal Directory, or the Okta Expression Language. We wanted to take an opportunity to talk about some real world examples of how we’ve been using it with some customers to achieve some advanced provisioning functionality.
The Last Shall Be First
A scenario we see quite often is using an alternate format for your display name. For this example rather than being “John Smith”, we want display name to be “Smith, John”. With a simple concatenation we can flip the order of the names around.source.firstName + ", " + source.lastName
Once you understand the syntax it is easy to see how you can manipulate the formatting of any user attribute.
No Email? No Problem!
Another issue we often see when provisioning a new employee account to Okta, particularly from an HR system like Workday(https://www.okta.com/solutions/hr-driven-it-provisioning.html) is the required email field. We’ve got a brand new user who doesn’t exist in any IT systems yet, and thus does not yet have an email address, but email is required to create an Okta account. This can be a real chicken or egg type problem when you’re trying to provision an account to an Active Directory, or Google Apps.A simple custom mapping allows us to create a placeholder for email so we can provision the account into AD or Google apps where we create a real email address.
The following expression checks to see if the email address is populated in the source application, if it is not, will get the username and add a string to the end. If the email is there, it will flow as it normally would.
source.email==null?source.userName + "@domainsuffix.com":source.email
Keep in mind, if your users are Okta mastered, they’ll need to have a valid email they can access in order to activate their account, but this can be a great placeholder so you can continue to provision accounts.
Original Author: Cody Suders, Technical Consultant - Professional Services, Okta