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:
- GraphQL
- cURL
query UserPermissions($userId: ID!) {
userPermissions(userId: $userId) {
id
name
createdAt
action
description
direct
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query UserPermissions($userId: ID!) {\n userPermissions(userId: $userId) {\n id\n name\n createdAt\n action\n description\n direct\n }\n}",
"variables": {
"userId": "id"
}
}
EOF
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.