There are certain instances where the display name attribute is blank on the Okta profile however it returns a false result on the condition: user.displayName == null or user.displayName == ""
- Group Rules
- Null or Blank Attributes
The Okta display name is an attribute that is not directly written to the database initially during user creation but is dynamically assembled within the JavaScript code. During user creation, it automatically combines the user's firstName and lastName with a space in between. Even if it appears empty in the admin UI in the user's profile, as long as it has not been edited, it will invariably hold the first-name {space} last-name value.
- In order to use the condition below, Admins will need to have edited and deleted the display name initially:
user.displayName == null or user.displayName == ""
- If the display name has never been modified:
- It will not be displayed in a GET request (api/v1/users/${usersId}).
- The UI will show a blank value, but it actually has a value of: user.firstName + " " + user.lastName
- If the display Name has been modified and deleted (meaning Admins set a value > saved the changes > edit > removed the value initially set > save the changes):
- The attribute will show up in a GET request.
- A blank value in UI will be equivalent to user.displayName == ""
NOTE: Okta does not recommend creating Group Rules that use displayName for these purposes. This is intended product behavior.
