---
title: User Role Assignments
description: The users role assignments endpoint implements functions to create, read, and delete the role assignments associated with user resources. For more information about roles and the permissions associated with each role, refer to Roles.
component: pingone-api
page_id: pingone-api:platform:users/user-role-assignments
canonical_url: https://developer.pingidentity.com/pingone-api/platform/users/user-role-assignments.html
section_ids:
  users-role-assignments-data-model: Users role assignments data model
  response-codes: Response codes
---

# User Role Assignments

The users role assignments endpoint implements functions to create, read, and delete the role assignments associated with user resources. For more information about roles and the permissions associated with each role, refer to [Roles](../roles.html).

Role assignments are defined by the role itself, and at a more granular level by the `scope` attribute associated with the role assignment. The role assignment scope identifies the type of platform resource that defines the scope, and the `id` of the specific resource to which the scope applies. The following sample shows the `scope` attribute, which includes the resource `type` and `id` attributes. In this case, the scope is restricted to the environment resource identified by its `id`.

```json
{
  "scope": {
   "id": "d928aa51-c194-4333-9cf5-0fd0c9b7d62f",
   "type": "ENVIRONMENT"
   }
}
```

Role assignment scopes can be:

* Organization

* Environment

* Population

* Application

## Users role assignments data model

| Property         | Type    | Required? | Mutable?  | Description                                                                                                                                                                                                                                        |
| ---------------- | ------- | --------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `environment.id` | String  | N/A       | Read-only | The environment associated with the user.                                                                                                                                                                                                          |
| `id`             | String  | N/A       | Read-only | Specifies the user role assignment ID.                                                                                                                                                                                                             |
| `readOnly`       | Boolean | Optional  | Mutable   | Specifies whether this role assignment can be deleted by the current actor.                                                                                                                                                                        |
| `role.id`        | String  | Required  | Mutable   | The role ID.                                                                                                                                                                                                                                       |
| `scope.id`       | String  | Required  | Mutable   | The role assignment scope ID. When this is an application ID, because an application ID is guarenteed to be globally unique (across all environments), the application ID here eliminates the need to also specify the application environment ID. |
| `scope.type`     | String  | Required  | Mutable   | The type of resource defining the scope of the Role assignment. Options are `ORGANIZATION`, `ENVIRONMENT`, and `POPULATION`, `APPLICATION`.                                                                                                        |

## Response codes

| Code | Message                                  |
| ---- | ---------------------------------------- |
| 200  | Successful operation.                    |
| 201  | Successfully created.                    |
| 204  | Successfully removed. No content.        |
| 400  | The request could not be completed.      |
| 401  | You do not have access to this resource. |
| 404  | The requested resource was not found.    |
