GitLab API icon

GitLab API

Gitlab

Actions880

Overview

This node operation disables two-factor authentication for a specified user in GitLab by sending a PATCH request to the GitLab API endpoint `/api/v4/users/{id}/disable_two_factor`. It is useful for administrators who need to manage user security settings, such as disabling two-factor authentication for users who have lost access to their authentication device.

Use Case Examples

  1. An admin disables two-factor authentication for a user with ID 123 to allow them to regain access to their account.
  2. Automated workflows that manage user security settings based on certain conditions.

Properties

Name Meaning
Skip Authentication Determines whether to skip the authentication process for the API request.
Authentication Specifies the authentication method to use, defaulting to GitLab API authentication.
baseUrl The base URL of the GitLab instance to which the API request is sent.
Method The HTTP method used for the API request, default is GET but PATCH is used for this operation.
Path Parameters The path parameters for the API request, specifically the user ID to identify which user's two-factor authentication to disable.

Output

JSON

  • id - The ID of the user whose two-factor authentication was disabled.
  • two_factor_enabled - Indicates whether two-factor authentication is enabled for the user after the operation.

Dependencies

  • GitLab API authentication credential

Troubleshooting

  • Ensure the user ID provided in the path parameters is valid and exists in the GitLab instance.
  • Verify that the API authentication credentials are correctly configured and have sufficient permissions to disable two-factor authentication for users.
  • Check the base URL to ensure it points to the correct GitLab instance.
  • Common error messages may include 401 Unauthorized if authentication fails, 404 Not Found if the user ID does not exist, or 403 Forbidden if the authenticated user lacks permission to perform this action.

Discussion