Disable MFA in bulk

Disables multi-factor authentication (MFA) for the specified accounts.

Required Permissions

Requires the ADMIN role or higher. You cannot apply this action to a user with higher privileges than yourself.

HTTP Request

POST /api/sonar/users/mfa/disable
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d '{"guids":"a1b2c3d4-e5f6-7890-abcd-ef1234567890,b2c3d4e5-f6a7-8901-bcde-f12345678901"}' \
     -X POST https://HOSTNAME/api/sonar/users/mfa/disable
Request Parameters
KeyRequiredTypeDescriptionNotes
guidsYesStringList of user identifiersComma-separated list of account identifiers

Success Response

All succeeded
{
  "failures": []
}
  • failures (Array): Error information for the accounts that failed disabling MFA
    • id (String): GUID of the user
    • name (String): Login name. Omitted when the user does not exist
    • reason (String): Reason for the failure
Partially succeeded
{
  "failures": [
    {
      "id": "ffaf431b-653a-4329-8f83-913cbb00342d",
      "name": "admin",
      "reason": "no-permission"
    }
  ]
}

Error Responses

Required argument is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "guids should be not null"
}
User identifier is not in valid GUID format

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guids should be guid type."
}
No administrator privileges

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}
User is not found

HTTP status code 200

{
  "failures": [
    {
      "id": "6ba6031e-9d03-4a2b-8372-20ceee8f2a75",
      "reason": "user-not-found"
    }
  ]
}
Apply to a user with higher privileges

HTTP status code 200

{
  "failures": [
    {
      "id": "ffaf431b-653a-4329-8f83-913cbb00342d",
      "name": "admin",
      "reason": "no-permission"
    }
  ]
}
MFA type is not set

HTTP status code 200. No MFA type is set on the target account.

{
  "failures": [
    {
      "id": "ffaf431b-653a-4329-8f83-913cbb00342d",
      "name": "gildong",
      "reason": "mfa-type-is-not-set"
    }
  ]
}