This article shows how admins can remove a Zero Width Space (ZWSP) U+200B character from attributes.
- Application Mappings
- Universal Directory
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.
These characters will not be visible in the attribute value and can only be seen using the Inspect option in the Developer console:
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
- For more info on how to create an expression, visit Okta Expression Language documentation.
