Skip to content

Create a role resource set binding

Request

OAuth 2.0 scope:
  • okta.roles.manage

Creates a binding for the resource set, custom role, and members (users or groups)

Note: If you use a custom role with permissions that don't apply to the resources in the resource set, it doesn't affect the admin role. For example, the okta.users.userprofile.manage permission gives the admin no privileges if it's granted to a resource set that only includes https://{yourOktaDomain}/api/v1/groups/{targetGroupId} resources. If you want the admin to be able to manage the users within the group, the resource set must include the corresponding https://{yourOktaDomain}/api/v1/groups/{targetGroupId}/users resource.

Path
resourceSetIdOrLabelstringrequired

id or label of the resource set

Example:iamoJDFKaJxGIr0oamd9g
Bodyapplication/jsonrequired
membersArray of strings

URLs to user and/or group instances that are assigned to the role

rolestring

Unique key for the role

curl -i -X POST \
  https://subdomain.okta.com/api/v1/iam/resource-sets/iamoJDFKaJxGIr0oamd9g/bindings \
  -H 'Content-Type: application/json' \
  -d '{
    "role": "cr0Yq6IJxGIr0ouum0g3",
    "members": [
      "https://{yourOktaDomain}/api/v1/groups/00guaxWZ0AOa5NFAj0g3"
    ]
  }'

Responses

Success

Bodyapplication/json
Response
{ "_links": { "self": { … }, "bindings": { … }, "resource-set": { … } } }