GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation deactivates a user in GitLab by sending a POST request to the endpoint `/api/v4/users/{id}/deactivate`. It is useful for administrators who want to programmatically deactivate user accounts in GitLab, for example, when managing user access or automating user lifecycle management.

Use Case Examples

  1. Deactivate a user by specifying their user ID to restrict their access to GitLab services.
  2. Automate user deactivation as part of an offboarding workflow.

Properties

Name Meaning
Skip Authentication Whether to skip authentication for the request (boolean).
Authentication The authentication method used for the request, defaulting to GitLab API key authentication.
baseUrl The base URL of the GitLab instance to which the request is sent, default is https://gitlab.com.
Method The HTTP method used for the request, default is POST.
Path Parameters The path parameters for the request, specifically the user ID to deactivate.

Output

JSON

  • id - The ID of the deactivated user.
  • username - The username of the deactivated user.
  • state - The state of the user account, expected to be 'deactivated' after the operation.
  • deactivated_at - Timestamp when the user was deactivated.

Dependencies

  • GitLab API key credential for authentication

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in the GitLab instance.
  • If authentication is skipped, the request may fail due to lack of permissions.
  • Check that the baseUrl is correctly set to the GitLab instance URL.
  • Common error messages include 404 Not Found if the user ID does not exist, and 401 Unauthorized if authentication fails.

Links

Discussion