Queries the multi-factor authentication (MFA) devices that are bound to a user. Up to two MFA devices can be bound to a user.

Usage notes

This topic provides an example on how to query the MFA devices that are bound to the user u-00q8wbq42wiltcrk****. The returned result shows that the MFA device named Alice-MFA1 is bound to the user.


You can call this operation up to 100 times per second per account. This operation is globally limited to 100 times per second across all accounts. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListMFADevicesForUser

The operation that you want to perform. Set the value to ListMFADevicesForUser.

DirectoryId String Yes d-00fc2p61****

The ID of the directory.

UserId String Yes u-00q8wbq42wiltcrk****

The ID of the user.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 8B9982ED-FD0D-5622-8EA0-7B768685DCE7

The ID of the request.

TotalCounts Integer 1

The total number of MFA devices.

MFADevices Array of MFADevice

The MFA devices.

DeviceType String TOTP

The type of the MFA device. The value is fixed as TOTP, which indicates a virtual MFA device. Virtual MFA devices are based on the Time-based One-time Password (TOTP) algorithm.

EffectiveTime String 2021-10-29T09:14:06Z

The time when the MFA device was enabled.

DeviceId String mfa-00ujhet8pycljj7j****

The ID of the MFA device.

UserId String u-00q8wbq42wiltcrk****

The ID of the user.

DeviceName String Alice-MFA1

The name of the MFA device.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "8B9982ED-FD0D-5622-8EA0-7B768685DCE7",
  "TotalCounts" : 1,
  "MFADevices" : [ {
    "DeviceType" : "TOTP",
    "EffectiveTime" : "2021-10-29T09:14:06Z",
    "DeviceId" : "mfa-00ujhet8pycljj7j****",
    "UserId" : "u-00q8wbq42wiltcrk****",
    "DeviceName" : "Alice-MFA1"
  } ]

Error codes

For a list of error codes, visit the API Error Center.