SCIM2 Custom User Schema Support¶
Asgardeo allows adding custom attributes into user objects through Custom schema.
How to add claims to support simple attributes¶
To add claims for simple attributes, follow these steps:
Add custom local claim¶
- Navigate to User Attributes & Stores > Attributes in console.
- Click Attributes under Manage Attributes.
-
Click New Attribute and enter the following values.
- Attribute Name:
http://wso2.org/claims/customClaim
- Attribute Display Name:
Custom Claim
- Attribute Name:
-
Go to the Edit Attribute of the custom attribute you just created.
- Select necessary options in Attribute Configurations to make the field visible in user profiles and click Update.
Map the custom claim¶
Note
SCIM 2.0 protocol mapping in Custom schema, will be created automatically with the Custom local claim creation as mentioned in the Protocol Mapping section in the wizard.
If it is not added, you can add it manually by,
- Navigate to User Attributes & Stores > Attributes in console.
- Click SCIM 2.0 under Manage Attribute Mappings.
- Click New Attribute in Custom Schema tab and enter the following values.
- SCIM Attribute:
customClaim
- User Attribute to map to: Select local claim from the dropdown
- SCIM Attribute:
- Click Add Attribute Mapping and click Finish.
Try it out¶
- Create a user from User Management > Users in console.
- Go to the User Profile of the user you just created.
- Add a value for the Custom Claim field and click Update.
How to add claims to support multi-valued simple attributes¶
Let's see when we've a deviceNames simple multi-valued attribute.
Add local claim for deviceNames¶
- Navigate to User Attributes & Stores > Attributes in console.
- Click Attributes under Manage Attributes.
- Click New Attribute and enter the following values.
- Attribute Name:
http://wso2.org/claims/deviceNames
- Attribute Display Name:
Device Names
- Attribute Name:
- Click Finish.
- Go to the Edit Attribute of the custom attribute you just created.
-
Select necessary options in Attribute Configurations to make the field visible in user profiles and click Update.
-
Check the Allow multiple values for this attribute.
Map the custom claim¶
Note
SCIM 2.0 protocol mapping in Custom schema, will be created automatically with the Custom local claim creation as mentioned in the Protocol Mapping section in the wizard.
If it is not added, refer Map the custom claim to add it manually.
Try it out¶
- Create a user from User Management > Users in console.
- Go to the User Profile of the user you just created.
- Add values for the Device Names field and click Update.
How to add claims to support Complex attributes¶
Let's see if we have a manager complex attribute that has address simple attribute and roles multi-valued attribute as the sub attributes.
Create claim mappings for Manager-Address claim¶
- Navigate to User Attributes & Stores > Attributes in console.
- Click Attributes under Manage Attributes.
- Click New Attribute and enter the following values.
- Attribute Name:
http://wso2.org/claims/manager.address
- Attribute Display Name:
Manager Address
- Attribute Name:
- Go to the Edit Attribute of the custom attribute you just created.
- Select necessary options in Attribute Configurations to make the field visible in user profiles and click Update.
Note
SCIM 2.0 protocol mapping in Custom schema, will be created automatically with the Custom local claim creation as mentioned in the Protocol Mapping section in the wizard.
Create claim mappings for Manager-Roles claim¶
- Navigate to User Attributes & Stores > Attributes in console.
- Click Attributes under Manage Attributes.
- Click New Attribute and enter the following values.
- Attribute Name:
http://wso2.org/claims/manager.roles
- Attribute Display Name:
Manager Roles
- Attribute Name:
- Click Finish.
- Go to the Edit Attribute of the custom attribute you just created.
-
Select necessary options in Attribute Configurations to make the field visible in user profiles and click Update.
-
Check the Allow multiple values for this attribute.
Note
SCIM 2.0 protocol mapping in Custom schema, will be created automatically with the Custom local claim creation as mentioned in the Protocol Mapping section in the wizard.
Create claim mappings for the Manager claim¶
- Navigate to User Attributes & Stores > Attributes in console.
- Click Attributes under Manage Attributes.
- Click New Attribute and enter the following values.
- Attribute Name:
http://wso2.org/claims/manager
- Attribute Display Name:
Manager
- Attribute Name:
- Click Finish.
-
Go to the Edit Attribute of the custom attribute you just created.
-
Select the Object data type as the attribute data type.
-
Add the
http://wso2.org/claims/manager.address
andhttp://wso2.org/claims/manager.roles
as sub-attributes.
Try it out¶
- Create a user from User Management > Users in console.
- Go to the User Profile of the user you just created.
- Add values for the Manager Address field, Manager Roles field and click Update.