n8n_update_user_in_project
Modify user permissions by changing their role within a specific n8n project to control access and responsibilities.
Instructions
Update a user's role in a project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID | |
| userId | Yes | User ID | |
| role | Yes | New role |
Implementation Reference
- src/index.ts:385-393 (handler)The tool handler case that calls the n8n client method.
case 'n8n_update_user_in_project': { if (!args?.projectId || !args?.userId || !args?.role) { throw new Error('projectId, userId, and role are required'); } const result = await n8nClient.updateUserInProject(args.projectId as string, args.userId as string, args.role as string); return { content: [{ type: 'text', text: formatResponse(result) }], }; } - src/n8n-client.ts:267-270 (handler)The implementation of the updateUserInProject method in the N8nClient class.
async updateUserInProject(projectId: string, userId: string, role: string): Promise<any> { const response = await this.client.patch(`/projects/${projectId}/users/${userId}`, { role }); return response.data; } - src/index.ts:888-900 (registration)The tool definition and schema registration for n8n_update_user_in_project.
{ name: 'n8n_update_user_in_project', description: 'Update a user\'s role in a project', inputSchema: { type: 'object', properties: { projectId: { type: 'string', description: 'Project ID' }, userId: { type: 'string', description: 'User ID' }, role: { type: 'string', description: 'New role' }, }, required: ['projectId', 'userId', 'role'], }, },