<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
Configuring Custom Username Format for SAML Applications
Single Sign-On
Okta Classic Engine
Okta Identity Engine
Overview
This article explains how to set up a custom username format, such as "DOMAIN\username," for SAML applications in Okta. The article also covers how to define and configure custom SAML attribute statements.
Applies To
  • SAML application
  • Custom username format
Solution

Configure Custom Username Format:

  1. In the Okta Admin Console, navigate to Applications > [SAML Application] > Sign On > Edit > Application username format > Custom.

 

Custom Username format

  1. 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:

  1. In the Okta Admin Console, navigate to Admin > Directory > Profile Editor.
  2. 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.

Profile editor

 

  1. Navigate to the Applications tab and select the SAML app to which this custom attribute is to be added.
  2. Click on the General tab and scroll down to the SAML Settings section. Click the Edit button to launch the App Configuration wizard.
  3. 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.
AttributeStatements
  1. Click Next, then Finish, to save the new SAML attribute statement.

 

Related References

 

 
Loading
Configuring Custom Username Format for SAML Applications