younifyd
Menu

Get Role Assignment

Get a user's roles

GET/projects/{projectId}/acl/{projectUserId}

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Get Role Assignment action (under Roles).
  3. Fill in the fields below, then reference the result from later steps as {{getRoleAssignment.response.data}}.

Request

Path parameters

projectIdstringrequired

The ID of the project

projectUserIdstringrequired

The project user ID, which starts with `p`. A Sanity user ID, which starts with `g`, returns `400`.

Response

Returns 200 with an object. Read it in later steps with {{getRoleAssignment.response.data.<field>}}.

projectUserIdstring

The project user ID

rolesarray<object>
namestring

The role name

titlestring

The role title

isRobotboolean

Whether the user is a robot

json
{
  "projectUserId": "p.....",
  "roles": [
    {
      "name": "administrator",
      "title": "Administrator"
    }
  ],
  "isRobot": false
}

Need more? See the Sanity guide for connection setup and behaviour shared by every action.

Was this page helpful?