Updated on 2024-07-30 GMT+08:00

Unbinding a Virtual MFA Device

Function

This API is used by the administrator to unbind a virtual MFA device from an IAM user, or used by an IAM user to unbind their own virtual MFA device.

The API can be called using both the global endpoint and region-specific endpoints. For IAM endpoints, see Regions and Endpoints.

Debugging

You can debug this API in API Explorer.

URI

PUT /v3.0/OS-MFA/mfa-devices/unbind

Request Parameters

Table 1 Parameters in the request header

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

  • If the administrator is requesting to unbind a virtual MFA device from an IAM user, see Actions.
  • If an IAM user is requesting to unbind their own virtual MFA device, the user token (no special permission requirements) of the user is required.
Table 2 Parameter in the request body

Parameter

Mandatory

Type

Description

user_id

Yes

String

ID of the user from whom you will unbind the MFA device.

authentication_code

Yes

String

  • Administrator: Enter a random 6-digit verification code.
  • IAM user: Enter the MFA verification code.

serial_number

Yes

String

Serial number of the virtual MFA device.

Response Parameters

None

Example Request

Request for unbinding an MFA device whose serial number is iam:09f6bd6a96801de40f01c00c85691...:mfa/{device_name}. The verification code is 373658.

PUT https://iam.myhuaweicloud.com/v3.0/OS-MFA/mfa-devices/unbind 

{ 
  "user_id" : "09f99d8f6a001d4f1f01c00c31968...", 
  "authentication_code" : "373658", 
  "serial_number" : "iam:09f6bd6a96801de40f01c00c85691...:mfa/{device_name}" 
}

Example Response

Status code: 204

The request is successful.

Status Codes

Status Code

Description

204

The request is successful.

400

The request is invalid.

401

Authentication failed.

403

You do not have permission to perform this action.

404

The requested resource cannot be found.

409

A conflict occurs when the requested resource is saved.

500

A system error occurred.

Error Codes

For details, see Error Codes.