Skip to main content

Assign a role to a user (create grant)

POST 

/rbac/grants

Assigns roleIdentifier to userIdentifier in the selected entity, optionally scoped to a set of sub-accounts.

Idempotent on the (entity, recipient, role, exact scope set) tuple: a duplicate POST returns 200 with the existing grant rather than creating a second one. A different scope set = a different grant (returns 201).

Requires GRANT_CREATE permission. Only Admins may assign the Admin role; the caller must itself hold an Admin grant in the entity.

Response is a flat RbacGrantForDisplay (identifiers only, no embedded role detail). Use GET /rbac/grants/{identifier} for the enriched view.

Request

Responses

Identical grant already exists (idempotent)