Format Array Attributes for Okta User Profiles via the Okta API
Last Updated:
Overview
When updating Okta user profiles with array datatype values via the Okta API, bulk operations using Comma-Separated Values (CSV) files often fail if the array strings lack proper formatting. Resolve this by enclosing the entire array string in quotes and doubling the double quotes for each array element within the CSV file.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta Core API
- String Array Datatypes
Solution
How are array attributes formatted in a CSV file for the Okta API?
Format array values in a Comma-Separated Values (CSV) file by enclosing the entire array string in quotes and doubling the double quotes for each array element.
- Enclose the entire array string in quotes.
- Double the double quotes for each array element. For example, to represent the values
Blue,Yellow, andGreenin an array for a field such asworkingCode, input the value in the CSV file as"[""Blue"", ""Yellow"", ""Green""]".
NOTE: While there is no item limit in a user profile array attribute, Okta recommends a maximum of 1000 items.
Review the following examples of a formatted CSV file, a Postman collection, and the resulting API response.
