How to Remove Zero Width Space (ZWSP) from Attributes
Lifecycle Management
Okta Classic Engine
Okta Identity Engine
Overview

This article shows how admins can remove a Zero Width Space (ZWSP) U+200B character from attributes. 

Applies To
  • Application Mappings
  • Universal Directory
Cause

Applications can send attributes that contain a ZWSP character to Okta. While Okta can store this special character, other downstream apps could report errors during Provisioning, as they do not support the character.

Solution

These characters will not be visible in the attribute value and can only be seen using the Inspect option in the Developer console:

Company ID 
Zero Width Space 


In order to remove this character, the application mappings could be set with the following expression:

substringBefore ( user.title, "​" ) + substringAfter ( user.title, "​" )
  • In between the quotations, there is a ZWSP character. This will not work if there is no character between quotations, or if Admins use the &ZeroWidthSpace value (like shown when inspecting the attribute field).
  • These special characters should be copied from a third-party resource since manually entering them will not properly evaluate the text.
    • substringBefore ( user.title, "&ZeroWidthSpace​" ) + substringAfter ( user.title, "&ZeroWidthSpace​" ) will not be evaluated properly.

Online resources can be used to copy a ZWSP character to a clipboard and paste it as needed in an expression, as the expression above serves just as an example and might need to be adapted for the specific use case.

 

Related References

Recommended content

No recommended content found...