Skip to main content

userPermissions

Requires an authenticated session.

Lists the permissions a user holds in your organization, combining direct grants and the permissions of their roles. Expired direct grants and grants through a deleted or inactive role are left out. Reading another user's needs the permissions read or users read permission.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query UserPermissions($userId: ID!) {
userPermissions(userId: $userId) {
id
name
createdAt
action
description
direct
}
}

Variables:

{
"userId": "id"
}

Response:

{
"data": {
"userPermissions": [
{
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"action": "string",
"description": "string",
"direct": true
}
]
}
}
userPermissions(
userId: ID!
): [Permission!]!

Arguments​

userPermissions.userId ● ID! non-null scalar​

The ID of the user.

Type​

Permission object​

A permission.