Payhawk icon

Payhawk

Interact with the Zitadel API

Actions99

Overview

This node operation updates a user's role and optionally their external identifier within a specified account. It is useful in scenarios where user permissions or roles need to be changed dynamically, such as promoting an employee to an admin or adjusting access levels based on organizational changes. For example, if a company wants to change a user's role from "Employee" to "Accounting" after a department transfer, this node can perform that update programmatically.

Properties

Name Meaning
Account Id Identifier of the account where the user belongs.
User Id Identifier of the user whose details are being updated.
Role New role assigned to the user. Options: Admin, Accounting, Employee.
External Id Unique identifier of the account user in an external system (optional).

Output

The node outputs JSON data representing the updated user information within the account. This typically includes confirmation of the updated fields such as the new role and any external ID set. The output structure reflects the API response confirming the successful update of the user record.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating requests to the external service managing accounts and users.
  • The node depends on a REST API endpoint that supports updating user roles and external IDs within accounts.
  • Proper configuration of the base URL and authentication credentials in n8n is necessary for successful execution.

Troubleshooting

  • Common Issues:
    • Invalid or missing Account Id or User Id will cause the update to fail.
    • Insufficient permissions associated with the API key may prevent role updates.
    • Providing an invalid role value outside the allowed options will result in an error.
  • Error Messages:
    • "User not found" indicates the provided User Id does not exist in the specified account.
    • "Unauthorized" suggests issues with API credentials or permissions.
    • "Invalid role value" means the role parameter was not one of the accepted options; ensure it is one of Admin, Accounting, or Employee.
  • Resolutions:
    • Verify that Account Id and User Id are correct and exist.
    • Check API credentials and permissions.
    • Use only the predefined role options.

Links and References

  • Refer to the external service's API documentation for user management and role updates.
  • n8n documentation on setting up API credentials and HTTP request nodes for further customization.

Discussion