You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Assigning role while creating a user through REST API

Accepted answer
114
Views
6
Comments
edited Feb 4, 2020 4:49PM in HCM Integrations 6 comments

Summary

Assigning role while creating a user through REST API

Content

All, How do you assign a role while creating a user through REST API. I was able to create a user along with the password, but not able to assign the role and getting the error message.

Here are the parameters

{
 "schemas":[
  "urn:scim:schemas:core:2.0:User"
 ],
 "name":{
  "givenName":"John",
  "familyName":"Doe"
 },
 "active":true,
 "userName":"[email protected]",
 
 "emails":[
  {
   "primary":true,
   "value":"[email protected]",
   "type":"W"
  }
  ],
 
 "displayName":"John Doe",
 "password": "Welcome2HCM",
 
 "roles": [
    {
      "value": "ORA_PER_EMPLOYEE_ABSTRACT"
    }
]
  }

Without the role parameters, I can create the user. But when the "roles" parameter is added (see above), I get Error - "Attribute roles is not allowed in the payload. (ASE-4335076)"

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!