# Get organization role assignments

`GET /v1/organizations/{organizationId}/role-assignment`

Available as MCP tool `get-org-roles` (Read).

Access control endpoints allow you to review and manage user role assignments. Organization and environment roles are managed separately. Furthermore, a user’s organizational role doesn't impact their assigned environment role, and vice versa. [Learn about roles](https://docs.redoxengine.com/permalink/1OBel3inQAjAnDbgd9QLzM). 

Generally, organization owners or admins can retrieve, assign, update, or remove role assignments. However, only organization owners can assign or remove organization roles specifically.

Organization owners and admins can create and manage access control groups. A group allows you to manage role assignments for an entire group of users at once. [Learn about groups](https://docs.redoxengine.com/permalink/1OBel3inQAjAnDbgd9QLzM/#assign-roles-with-groups).

> **Assign or add an organization role**
>
> We don't currently support assigning an organization role (i.e., adding a user to an organization) in the Redox dashboard. [Learn how to add a user](https://docs.redoxengine.com/permalink/5c0Yr43tA3HrfvhX2JR3WS).

### Get organization role assignments

Retrieve a list of organization roles and related user assignments within the organization indicated in the request. 

You must be an organization owner or admin to view role assignments.

## Request parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `organizationId` | path | string | Yes | Identifies the Redox organization that you're operating in or on behalf of. |

## Request example

```bash
curl 'https://api.redoxengine.com/platform/v1/organizations/{organizationId}/role-assignment' \
--request GET \
--header 'Authorization: Bearer $API_TOKEN' \
--header 'accept: application/json'
```

## Responses

### 200

Contains a payload object with a list of members in the specified organization.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `meta` | object | No |  |
| `meta.version` | string | No | Lists the major and minor version number for the format of the returned payload. The payload format or shape may change between minor versions, like including additional or extended fields in later versions. We include the version data in each response so that you have the option to handle the signaled differences. |
| `payload` | object | No | Contains the payload with details about the requested organization role assignments. |
| `payload.memberships` | Array of object | No | Contains an array of role assignment for an organization. |
| `payload.memberships[].organization` | object | No |  |
| `payload.memberships[].organization.id` | string | No | Identifies the specific organization that you're operating in or on behalf of. |
| `payload.memberships[].organization.name` | string | No | Displays the human readable name of the Redox organization. |
| `payload.memberships[].role` | object | No |  |
| `payload.memberships[].role.id` | string | No | Displays the unique identifier of the role. |
| `payload.memberships[].role.name` | string | No | Displays the name of the role. |
| `payload.memberships[].user` | object | No |  |
| `payload.memberships[].user.id` | string | No | Displays the unique identifier of the user. |
| `payload.memberships[].user.fullname` | string | No | Displays the full name of the user. |
| `payload.memberships[].user.lowercaseEmail` | string | No | Displays the email of the user in lowecase format. |
| `payload.memberships[].user.lastLogin` | string | No | Displays a timestamp of when the user last logged in. |
| `payload.memberships[].user.verified2fa` | boolean | No | Displays whether the user has verified a two-factor authentication method. |

_Generated from the schema: the values are placeholders, not a real payload._

```json
{
  "meta": {
    "version": "1.0.0"
  },
  "payload": {
    "memberships": [
      {
        "organization": {
          "id": "string",
          "name": "string"
        },
        "role": {
          "id": "string",
          "name": "string"
        },
        "user": {
          "id": "string",
          "fullname": "string",
          "lowercaseEmail": "string",
          "lastLogin": "string",
          "verified2fa": true
        }
      }
    ]
  }
}
```

### 400

Bad Request

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.error` | object | No | Contains the error message details. |
| `payload.error.id` | string | No | Contains a unique identifier for the given error instance. |
| `payload.error.title` | string | No | Displays the high-level error message, typically something succinct like `Bad Request`. |
| `payload.error.code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |
| `payload.error.detail` | string | No | Contains the specific error details for this message. |
| `payload.error.status` | number | No | Displays the corresponding HTTP status code for the error. |
| `payload.error.transient` | boolean | No | Describes whether the error will resolve itself. If `true`, no further action needs to be taken. If `false`, you may need to troubleshoot on your end to resolve the issue before the error can be processed. |

```json
{
  "payload": {
    "error": {
      "title": "Bad Request",
      "code": "validation.error.bad.request",
      "detail": "Error details",
      "status": 400,
      "transient": false
    }
  }
}
```

### 403

Forbidden

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.errors` | Array of object | No |  |
| `payload.errors[].title` | string | No | Displays the high-level error message, typically something succinct like `Forbidden`. |
| `payload.errors[].code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |

```json
{
  "payload": {
    "errors": [
      {
        "title": "Forbidden",
        "code": "authorization.forbidden"
      }
    ]
  }
}
```

### 500

Internal Server Error

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `payload` | object | No | Contains the error message. |
| `payload.error` | object | No | Contains the error message details. |
| `payload.error.title` | string | No | Displays the high-level error message, typically something succinct like `Failed in step X`. |
| `payload.error.code` | string | No | Contains an alternative ID for the error type, which can be used to find relevant troubleshooting information. |
| `payload.error.detail` | string | No | Contains the specific error details for this message. |
| `payload.error.status` | number | No | Displays the corresponding HTTP status code for the error. |
| `payload.error.transient` | boolean | No | Describes whether the error will resolve itself. If `true`, no further action needs to be taken. If `false`, you may need to troubleshoot on your end to resolve the issue before the error can be processed. |

```json
{
  "payload": {
    "error": {
      "title": "Internal Server Error",
      "code": "failed.db.lookup",
      "detail": "Error details",
      "status": 500,
      "transient": true
    }
  }
}
```
