Docs

List the members of a project

GET
/projects/{project_id}/members

Lists the people who have a role on a project, with each person's strongest role and how they hold it.

A person appears once, with their strongest relation (viewer, editor or admin; a stronger role includes the weaker ones) and one entry in sources per way they hold that role:

  • owning_team: an active member of the team that owns the project, the team a claim attaches the project to. It holds admin. Removing a grant does not remove this access. It ends only when the person leaves the team or the project changes owner.
  • grant: an unexpired grant on the project, which is a role given to the person (grant_id only) or to a team they are an active member of (grant_id and team). Revoking that grant removes this source.

Grants of a weaker role than the person's strongest are not in sources; they still show in the project's grants (queryGrants, POST /grants/query).

Pass relation to list only the people whose strongest role is at least that strong: relation=admin lists the people who can administer the project.

The list follows the authorization check. A person who left a team, or whose team or user was deactivated, is not listed through it. Expired grants are left out. Like the check, a direct user grant requires an active user, so a suspended person's direct grant is not listed.

Every caller who passes the project read check sees every listed person and every team name on sources. Co-membership no longer filters the roster.

The list is ordered by user_id and paginated with page_token. Authenticate with a project secret (oauth2), or with the session cookie (sessionCookie) of a signed-in person who can read the project.

Authorization

headerAuthorizationBearer <token>

Scope: project.write

Path Parameters

project_id*string
Match^[a-zA-Z0-9_-]+$

Query Parameters

limit?integer

Maximum number of items to return.

Range1 <= value <= 100
Default20
page_token?string

Token for fetching the next page of results. Obtain this value from next_page_token in the previous response. Omit to start from the beginning. Its format is opaque and may change between releases.

relation?string

Only the people whose strongest role is at least this strong. Absent lists everyone with a role.

Value in"viewer""editor""admin"

Response Body

A page of the project's members.

application/json
  1. response

A page of the people who have a role on a project.

members*array<>
next_page_token?|

Token to pass as page_token in the next request to fetch the following page. Absent when there are no more results.

Example Request
import { configureZitadel, getApi } from "@zitadel/api/config";// In the browser, through the SDK proxy: the session cookie authenticates the call.const client = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));const projectMembers = await client.listProjectMembers("string");
Example Response
{  "members": [    {      "user": {        "user_id": "string",        "identifier": "string",        "identifier_property": "string",        "display": "string"      },      "relation": "viewer",      "sources": [        {          "type": "owning_team",          "team": {            "team_id": "string",            "name": "string"          }        }      ]    }  ],  "next_page_token": "string"}

Was this helpful?