I’m trying to build a user and project lifecycle on top of n8n.
So far I can:
– create users via the API
create projects via the API
What I’m missing is a way to manage and query the relationship between them:
– Given a project: how can I list all users that belong to this project (including their project roles)?
Given a user: how can I list all projects this user is assigned to?
I had a look at the REST API docs, but they only show the global user role endpoint here:
https://docs.n8n.io/api/api-reference/#tag/user/PATCH/users/{id}/role
This seems to update the instance‑level role of a user, not the project membership / project‑level role.
Did I miss an endpoint for:
– listing project members,
– assigning/removing users to/from projects, or
listing projects for a given user?
If this isn’t exposed yet, is there a recommended approach (e.g. internal API, GraphQL, or an upcoming feature) for managing user↔project assignments programmatically?
or context, this is the lifecycle I’m trying to implement:
- User creation & onboarding
- Create a new n8n user (manually or via API/SSO).
- Automatically assign this user to one or more projects based on our internal rules (team, department, cost center, etc.).
- Set the appropriate project‑level role (for example: viewer, editor, admin).
- Ongoing changes
- When a user moves to a different team, we want to update their project assignments and roles accordingly (add/remove projects, change project roles).
- Ideally we can keep this in sync with our identity provider or an internal source of truth.
- Offboarding / deactivation
- When a user leaves the company or no longer needs access, we want to:
- remove them from all relevant projects (or
- deactivate the user account),
- and ensure they no longer have access to any workflows or credentials.
To implement this end‑to‑end, I’d need API endpoints that let me manage and query the user ↔ project relationship (list/assign/remove memberships and roles), not just the global instance role.