<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
Stripping Leading Zeros from SAML Attribute Values
Single Sign-On
Okta Classic Engine
Okta Identity Engine
Overview

This article provides a solution for resolving attribute mismatches in SAML applications due to leading zeros in attribute values. By using the Okta Expression Language, strip leading zeros from SAML attributes to ensure consistent user identification across applications.

Applies To
  • Security Assertion Markup Language (SAML) Applications
  • Okta Administrators
Cause

Attribute mismatches between two applications due to leading zeros in attribute values.

Solution

Follow the steps or video below.

  1. Identify the variable name of the user attribute to modify by looking at the User (default) profile.
  2. Navigate to the Applications tab and select the SAML app to update.
  3. Click on the General tab and scroll down to the SAML Settings section. Click the Edit button to launch the App Configuration wizard.
  4. In the Attribute Statements (Optional) section, find the attribute to modify.
  5. In the value field, use the Okta Expression Language to strip leading zeros. For example, use String.substring(user.value, 2, 8), where 2 is the number of leading characters to remove, and 8 is the total number of characters in the value.
  6. Click Next and then Finish to save the updated SAML attribute statement.
  7. Verify these changes with a SAML tracer(Optional).

 

Related References

Loading
Stripping Leading Zeros from SAML Attribute Values