HAP icon

HAP

Interact with HAP (Hyper Application Platform) API

Role → Leave All

AI-generated

Overview

This node interacts with the HAP (Hyper Application Platform) API to manage roles and their memberships. Specifically, the Role - Leave All operation removes a specified user from all roles they are currently assigned to within the platform.

This operation is useful in scenarios such as:

  • Revoking all role-based permissions for a user who is leaving an organization.
  • Resetting a user's access rights before reassigning new roles.
  • Automating bulk removal of users from roles during cleanup or audits.

For example, if you want to remove a user identified by their User ID from every role they belong to, this operation will perform that action in one step without needing to specify each role individually.

Properties

Name Meaning
User ID The unique identifier of the user to be removed from all roles. This is a required field.

Output

The node outputs JSON data representing the result of the "leave all roles" operation. Typically, this would include confirmation of the removal action, such as success status or details about which roles the user was removed from.

If the node supports binary data output, it would generally relate to any files or attachments returned by the API, but for this operation, the output is expected to be purely JSON indicating the operation's outcome.

Dependencies

  • Requires an active connection to the HAP API via an API key credential configured in n8n.
  • The node expects proper authentication headers to be set automatically using the provided credentials.
  • No additional external dependencies beyond the HAP API service.

Troubleshooting

  • Common Issues:

    • Invalid or missing User ID: The operation requires a valid user identifier; ensure the User ID is correct and exists in the system.
    • Authentication errors: If the API key or credentials are invalid or expired, the request will fail.
    • Network connectivity issues: Ensure n8n can reach the HAP API endpoint.
  • Error Messages:

    • "User not found": Indicates the provided User ID does not exist. Verify the ID.
    • "Unauthorized" or "Authentication failed": Check API credentials and permissions.
    • "Failed to remove user from roles": Could indicate server-side issues or insufficient permissions.

Resolving these typically involves verifying input parameters, checking API credentials, and ensuring network access.

Links and References

Discussion