<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
Merged Attributes Using Arrays.flatten Do Not Update After Okta Active Directory Import
Okta Classic Engine
Okta Identity Engine
Directories
Overview

Merged attributes using the The Arrays.flatten expression does not update immediately after an Active Directory (AD) import because the expression fails to evaluate if any element contains a null or empty value. Resolve this issue by adding a null check with a ternary operator to each element in the expression to replace null values with an empty array.

 

Specifically, when Okta retrieves multiple department code attributes (such as xDepartmentCdConcurrently1 through xDepartmentCdConcurrently10) from AD and merges them into a single Okta user profile attribute, the target attribute value remains unchanged after an import.

Applies To
  • Okta Identity Engine (OIE)
  • Okta Classic Engine
  • Active Directory (AD) Integration
  • Attribute Mapping
Cause

The Arrays.flatten expression fails to evaluate if any of the specified elements contain a null or empty value. This evaluation failure prevents Okta from updating the attribute during import.

Solution

Add a null check using a ternary operator to each element within the Arrays.flatten expression. Replace any null values with an empty array {} to prevent the expression evaluation from failing.

 

Update the attribute mapping expression to include null checks for each department code attribute by using the following format:

Arrays.flatten(
  appuser.xDepartmentCdConcurrently1 != null ? appuser.xDepartmentCdConcurrently1 : {},
  appuser.xDepartmentCdConcurrently2 != null ? appuser.xDepartmentCdConcurrently2 : {},
  ...
  appuser.xDepartmentCdConcurrently10 != null ? appuser.xDepartmentCdConcurrently10 : {}
)
Loading
Merged Attributes Using Arrays.flatten Do Not Update After Okta Active Directory Import