- SAML application
- Custom username format
Configure Custom Username Format:
- In the Okta Admin Console, navigate to Applications > [SAML Application] > Sign On > Edit > Application username format > Custom.
- The Okta Expression Language (OEL) can be used in a Custom Application username format to customize attributes. For reference on available OELs, please see Okta Expression Language overview. In the example below, if the domain is DOMAIN and the username is ExampleUser@example.com, it will be converted to DOMAIN\exampleuser:
"<PUTYOURDOMAINHERE>" + "\" + String.toLowerCase(String.substringBefore(user.login, '@'))
Define and Configure Custom SAML Attribute Statements:
- In the Okta Admin Console, navigate to Admin > Directory > Profile Editor.
- The variable name of the user attribute to be added can be identified by examining the User (default) profile. In this example, the user attribute for Username would be the variable name for the profile combined with the variable name for Username: user.login.
- Navigate to the Applications tab and select the SAML app to which this custom attribute is to be added.
- Click on the General tab and scroll down to the SAML Settings section. Click the Edit button to launch the App Configuration wizard.
- In the Attribute Statements (Optional) section, the name of the SAML attribute will be added to the Name field, and the variable for the user attribute will be added to the Value field.
- Click Next, then Finish, to save the new SAML attribute statement.
Related References
