Describe the problem/error/question
Good afternoon! I’m working on automating Active Directory group synchronization with n8n projects, and I’ve hit a roadblock with the public API.
What I’m trying to accomplish: I want to automatically sync Active Directory groups with n8n project memberships. To do this properly, I need to:
-
Get the current list of users in each project
-
Get each user’s role/permission level in that project
-
Compare with AD groups to determine if I need to add, remove, or update users to projects
What I’ve found so far: The n8n API documentation shows how to:
-
Add a user to a project (POST /api/v1/projects/{projectId}/users) -
Remove a user from a project (DELETE api/v1/projects/{projectId}/users/{userId}) -
Update a user’s role in a project (PATCH api/v1/projects/{projectId}/users/{userId})
What seems to be missing:
-
Get a list of users in a project with their roles (GET /api/v1/projects/{projectId}/usersreturns 405 Method Not Allowed) -
Get user-project relationships through any other endpoint
What I’ve tried:
-
GET /api/v1/projects/{projectId}- Returns basic project info (id, name, type) but no user data -
GET /api/v1/projects/{projectId}/users- Returns 405 Method Not Allowed -
GET /api/v1/projects/{projectId}/relations- Returns 404 Not Found -
GET /api/v1/users- Returns all users but without project associations
What I’ve observed: I can see in the browser’s network tab that the n8n UI successfully retrieves project members through REST endpoints, but when I try to access these same endpoints using an API key, I get permission errors or method not allowed responses.
My question: Is there a way to retrieve the current list of users and their roles for a specific project using the public API with an API key? Or is this functionality only available through the UI’s internal REST interface?
This is the last missing piece for a fully automated AD → n8n synchronization solution. Without the ability to read current project memberships, I can’t determine whether users need to be added, removed, or have their roles updated.
Any guidance would be greatly appreciated!
Information on your n8n setup
- n8n version: 1.118.2
- Database (default: SQLite): PostgreSQL
- n8n EXECUTIONS_PROCESS setting (default: own, main): ???
- Running n8n via (Docker, npm, n8n cloud, desktop app): Kubernetes (AKS)
- Operating system: Community HELM