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.
- Security Assertion Markup Language (SAML) Applications
- Okta Administrators
Attribute mismatches between two applications due to leading zeros in attribute values.
Follow the steps or video below.
- Identify the variable name of the user attribute to modify by looking at the User (default) profile.
- Navigate to the Applications tab and select the SAML app to update.
- 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, find the attribute to modify.
- 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.
- Click Next and then Finish to save the updated SAML attribute statement.
- Verify these changes with a SAML tracer(Optional).
