How to Pass Multivalued Attributes in a SCIM User Object in Okta
Last Updated:
Overview
Passing multivalued attributes from Okta to a System for Cross-domain Identity Management (SCIM) server requires creating multiple attributes in the SCIM application profile. The SCIM specifications allow passing multivalued attributes, such as multiple emails or roles, as a JavaScript Object Notation (JSON) array in user objects sent during create or update user requests.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- System for Cross-domain Identity Management (SCIM) Server
- Create User
- Update User
- Multivalue Attributes
- User Attributes
Solution
How are multivalued attributes passed in a SCIM user object?
Create multiple attributes in the SCIM application profile, map the Okta attributes to the SCIM attributes, and assign a test user to verify the configuration by following these steps.
- Navigate to Directory > Profile Editor and select the SCIM application profile.
- Select Add Attribute to create the first attribute named Primary Role, with the External Name set to
roles.^[type=='Primary'].value. - Select Add Attribute again to create another attribute named Additional Role, with the External Name set to
roles.^[type=='additional'].value. - Navigate to Directory > Profile Editor and select the Profile button next to Okta to create two Okta profile attributes.
- Select Add Attribute and add two Okta attributes, or use existing attributes.
- Select Map Attributes and select the Okta to SCIM tab to map the two Okta attributes to the SCIM attributes created in the previous steps.
- Select Save Mappings.
- Navigate to Directory > People and select a user profile to test the configuration. Ensure that the two attributes contain a value.
- Enable provisioning using the SCIM server in the SCIM application and assign the test user to the SCIM application.
How does the external name format construct the multivalued attribute?
Review the following examples to understand how Okta uses the external name format to construct the multivalued attribute.
Okta uses the external name format to construct the multivalued attribute. A basic multivalued attribute, according to the SCIM specification, contains at least two attributes per object. One attribute is type, and the second is value. The type identifies the kind of each value. For example, Developer Support is the value of type Primary.
The external name format uses brackets {} to indicate variable values:
{attributeName}.^[type=='{typeName}'].value
The {attributeName} specifies the name of the multivalued attribute being constructed. In the previous example, the attribute name is roles. Any other SCIM application attribute that starts with the same name is added to that array.
Review the following example of a multivalued email attribute:
"email" : [
{
"primary" : true,
"value" : "username@example.com"
},
{
"type" : work,
"value" : "username@acme.com"
}
]
Review the following example of the roles object received in the create user request:
roles: [
{ type: 'additional', 'value ': 'Developer Support' },
{ type: 'Primary', value: 'KCS Writer' }
]
