GetUserMFAInfo

Last Updated: Nov 10, 2017

Interface description

Obtains the MFA device bound to a specified user.

Request parameters

Action

  • Type: String
  • Required: Yes
  • Description: Operation interface, required. The parameter value is “GetUserMFAInfo”.

UserName

  • Type: String
  • Required: Yes
  • Description: User name.

Return parameters

MFADevice

Required permissions

Action

ram:GetUserMFAInfo

Resource

acs:ram:*:${AccountId}:user/${UserName}

Error messages

EntityNotExist.User
  • HTTP Status: 404
  • Error Message: The user does not exist.
EntityNotExist.User.MFADevice
  • HTTP Status: 404
  • Error Message: The user has not bound any MFA device.

Operation examples

Request example

  1. https://ram.aliyuncs.com/?Action=GetUserMFAInfo
  2. &UserName=zhangqiang
  3. &<Public request parameters>

Return example

XML format

  1. <GetUserMFAInfoResponse>
  2. <RequestId>04F0F334-1335-436C-A1D7-6C044FE73368</RequestId>
  3. <MFADevice>
  4. <SerialNumber>Virtual-MFA-device002</SerialNumber>
  5. </MFADevice>
  6. </GetUserMFAInfoResponse>

JSON format

  1. {
  2. "RequestId": "04F0F334-1335-436C-A1D7-6C044FE73368",
  3. "MFADevice": {
  4. "SerialNumber":"Virtual-MFA-device002"
  5. }
  6. }
Thank you! We've received your feedback.