---
id: user-role-list
title: "List user roles"
description: "Lists all roles assigned to users in your organization."
sidebar_label: "List user roles"
hide_title: true
hide_table_of_contents: true
api: eJzdWOFuHLcRfpUB/yQBtqeTLVn2FQ6g2k6joFEFWUYDSIIyxx3dMuGSa5Ir+Xw4oD/6v+/Qp2hfpy/QVyiG3L3dvTvJqpI0RfXjpKOGM98M5xsOZyFy8tKpKihrxET8QfngAbUGZzV5QO/VzFAOwULtyXlQBua2dmDdDI36iLxxdGFEJgLOvJici1OrCdDkMHNogrjMhK3IRcGjXEwE67li9ROtfBCZ8CRrp8JcTM4XYkroyB3WoRCT88vlZSYqdFhSIOejgGKc72tyc5EJgyW1KlUusjV3vlI6kGt8mc6jC3D0esRGZUElislChHnFOpQJNCMnlplw9L5WjnIxCa6mTNAHLCtNYnLw/MUy2w7BOI7B+s774RyfHm+F4oNTZiaWd9lSRuo6p3u2ZoJMXfJpVGRyXrlcrqM5SloaOKHAAOgImg2AUlIV0EhKx9u5do3a96OyssGn5chX1njyDOrJeMy/hnbPCoJVRsAtevC1lOT9da05HNKaQCbwRqwqrWQU3PnB8+7FpsvoHHJwVKDS99bt9AeSYYD8vJcpMTs9p2flGE5QCXMrsZkZ6wFkR2qj3tcER6/BXkPgBU6xGMwCPUyJTEeiGGl2cZhQLZRHuhS9adLPatr06PHORGADwLtPnu7tL5O9LVm3qfP49LjV5sjb2kmC24IcraL1mY+BAdWVm4FJ0S81L3cnKKWtTXi5O2E6+Aol8WqXKi/3mMQ+YKj9fdRAGdQNs2jFkW0OJD39420BJ7QlmTC6MBfmS/jnn/8G3yet30/grM2GVSLEcHIxLajRYHKQtXNkgp5HOYxMGF2YL1cKG3SNxjXLMWq3qEKkbFU5e4P6t40a/qexAeYUWtuJy11smxgsm9x5SKp5Xc/aWvT4XOuSrOdRumjaOPeBPnvxbPf58xfPD5ZtFXxI8hV1ieY3jjDHqSbgjX2rwzQ7zEtlYuawgw/Sz5J3K8RW4WDjp/QewtQpuobeat/EZx6q2lXWp+ypy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9p55/o4Fbsf+nTSaTi4E+hJ1KY3qUxfgtmmCfixhskXXTSa4LhfWB/7lYTNHTO6eXS15O4zg+hFx5TsFuKHYn/s9Pm3r0BdwzldyK9EeaD2acN6hrlhI8H/xZEDSDyHusp/nSIy3/h5PGe2B0k88OyiV/cSr1oOc85ywIc3LxgNK2w2iht2vjKmEtKxr+/s2ZyGJG9AiyRoiovX2gmnlP92KRJM7sj2SWS9FiD/xdLC+Xy+W/ASuaJAc=
sidebar_class_name: "get api-method"
info_path: docs/api/authorization
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"List user roles"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/authz/user_role"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Lists all roles assigned to users in your organization.


<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"in":"query","name":"user_id","description":"Filter roles by user ID.","schema":{"type":"integer"},"required":true,"example":789},{"in":"query","name":"nrn","required":true,"description":"Filter roles by NRN.","schema":{"type":"string"}},{"in":"query","name":"include","schema":{"type":"string","enum":["pending"]},"description":"Include roles that are pending acceptance.\n","required":false,"example":"pending"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The operation was successful.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["user_id","grants"],"properties":{"user_id":{"type":"integer","description":"The unique ID of the user that has been assigned roles.","example":789},"grants":{"type":"array","items":{"type":"object","required":["id","nrn","role"],"properties":{"id":{"type":"integer","description":"The unique ID of the grant.","example":12345},"nrn":{"type":"string","description":"The NRN of the resource where the user's role is assigned.","example":"organization=1:account=1:namespace=1:application=4"},"status":{"type":"string","enum":["active","pending"],"description":"The status of the user's role assignment.\n\n> • `active`: The user has been granted the role and currently has access.\n>\n> • `pending`: The role assignment is awaiting approval; access is not yet granted.\n","example":"active"},"role":{"type":"object","required":["id","slug","name"],"properties":{"id":{"type":"integer","description":"The ID of the role assigned to the user","example":696188987},"name":{"type":"string","description":"The human-readable name of the role.","example":"Admin"},"slug":{"type":"string","description":"The slug of the role.","example":"admin"},"description":{"type":"string","description":"A brief description of the role's purpose and permissions.","example":"Manage all the resources"},"level":{"type":"string","description":"The level of the role within the organization hierarchy.","nullable":true,"deprecated":true,"example":null},"can_assign_roles":{"type":"array","description":"List of role that this role can assign to other users.\n\n> ℹ️ If the role cannot assign any roles, we return an empty array.\n","items":{"type":"object","required":["id","slug","name"],"properties":{"id":{"type":"integer","description":"The ID of the role that can be assigned.","example":700317756},"name":{"type":"string","description":"The human-readable name of the role that can be assigned.","example":"Developer"},"slug":{"type":"string","description":"The slug of the role that can be assigned.","example":"developer"},"description":{"type":"string","description":"A brief description of the role's purpose and permissions.","example":"Can create builds and releases, scopes, and start deployments"},"level":{"type":"string","description":"The level of the role within the organization hierarchy.","nullable":true,"deprecated":true,"example":null},"assignment_restriction":{"type":"string","nullable":true,"description":"Indicates any restrictions on assigning this role, depending on the user type.\n","enum":["PERSON","MACHINE"],"example":null}}}}}}},"title":"userRoleResponse"}}},"title":"userRolePaginatedResponse"}}}}},"4XX":{"description":"Client error responses due to invalid input or missing parameters.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific client error (e.g., 400, 401, 403, 404).","example":400},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"bad_request"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Bad Request\", \"Unauthorized\").","example":"Bad Request"},"message":{"type":"string","description":"Additional details about the error.","example":"The request was malformed or contained invalid parameters."}}}}}},"5XX":{"description":"Server error responses indicating an issue on the API side.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific server error (e.g., 500, 502, 503).","example":500},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"internal_server_error"},"error":{"type":"string","description":"A brief, human-readable description of the error type (e.g., \"Internal Server Error\", \"Service Unavailable\").","example":"Internal Server Error"},"message":{"type":"string","description":"Additional details about the error.","example":"An unexpected error occurred. Please try again later."}}}}}}}}
>
  
</StatusCodes>


      