ankalal
ankalal

Reputation: 172

create user with extended claim with scim2 in wso2

I am trying to create a user with scim2 API in wso2 with my own extended claim my API request { "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], "name": { "familyName": "jackson", "givenName": "kim" }, "userName": "test3", "password": "abc123", "demoRole":"student", "emails": [ { "primary": true, "value": "[email protected]", "type": "home" }, { "value": "[email protected]", "type": "work" } ], "roles":[ { "value": "PRIMARY/manager" } ] }

and the configuration in scim2-schema-extension.config.xml is

{ "attributeURI":"urn:ietf:params:scim:schemas:core:2.0:User:demoRole", "attributeName":"demoRole", "dataType":"string", "multiValued":"false", "description":"The displayName of the User's manager.", "required":"false", "caseExact":"false", "mutability":"readwrite", "returned":"default", "uniqueness":"none", "subAttributes":"null", "canonicalValues":[], "referenceTypes":["external"] },

my claim configuration is

Claim URI -> urn:ietf:params:scim:schemas:core:2.0:User:demoRole

Mapped Local Claim -> http://wso2.org/claims/demoRole

Upvotes: 0

Views: 252

Answers (1)

Abilashini
Abilashini

Reputation: 46

Attribute URI for your schema extension should be,

urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:demoRole

So, External claim URI for urn:ietf:params:scim:schemas:extension:enterprise:2.0:User will be,

urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:demoRole

SCIM2 create user request should contain the demoRole as,

"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User":{"demoRole":"student"}

For more details on the schema extension representation, refer the specification

Upvotes: 0

Related Questions