All Products
Search
Document Center

Resource Access Management:GetUserMFAInfo

Last Updated:May 08, 2024

Queries the information of the multi-factor authentication (MFA) device that is bound to a RAM user.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
ram:GetUserMFAInfoRead
  • User
    acs:ram::{#accountId}:user/{#UserName}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
UserPrincipalNamestringNo

The logon name of the RAM user. This parameter is differently set in the following scenarios:

  • If you use a RAM user to call this operation, this parameter can be left empty. If you do not specify this parameter, the information of the MFA device that is bound to the RAM user is queried.
  • If you use an Alibaba Cloud account to call this operation, you must set this parameter to the logon name of the RAM user that you want to query.
test@example.onaliyun.com

Response parameters

ParameterTypeDescriptionExample
object
MFADeviceobject

The information about the MFA device.

SerialNumberstring

The serial number of the MFA device.

acs:ram::177242285274****:mfa/device001
Typestring

The type of the MFA device. Valid values:

  • VMFA: virtual MFA device
  • U2F: Universal 2nd Factor (U2F) security key
VMFA
RequestIdstring

The ID of the request.

FCF7322A-20A9-4F68-8B7F-F86958839BC0
IsMFAEnableboolean

Indicates whether the MFA device is enabled. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "MFADevice": {
    "SerialNumber": "acs:ram::177242285274****:mfa/device001",
    "Type": "VMFA"
  },
  "RequestId": "FCF7322A-20A9-4F68-8B7F-F86958839BC0",
  "IsMFAEnable": true
}

Error codes

For a list of error codes, visit the Service error codes.