Skip to main content

Last updated: 2024-06-07


GetUserMultiFactorAuthentication Method


In this topic:


Overview


The GetUserMultiFactorAuthentication method indicates whether a user account has two-step authentication enabled and returns the notification method that the user has selected. The status is indicated by a value of 0 (disabled) or 1 (enabled).


The GetUserMultiFactorAuthentication method is invoked using the method operation.


Note: To retrieve two-factor authentication status at the office account level, use the GetOfficeMultiFactorAuthentication method.


Parameters


Parameter NameTypeRequired?Description
UserIDStringYesThis is the object ID of the SmartOffice user account.

Reference


The response contains the following elements:


ElementDescriptionPossible Values
TwoWayAuthModeSpecifies whether two-step authentication is enabled.0 (disabled) or 1 (enabled)
OTPNotifyMethodSpecifies the notification method the user has selected for receiving verification codes.




If the user has disabled two-step authentication, this value reflects the notification method selected the last time the user enabled two-step authentication. If the user has never enabled two-step authentication, the value is 0 (none).
0 (none), 1 (text), 2 (e-mail), or 3 (text and e-mail)

Example


This example requests the two-step authentication status of a user with object ID Office.1.1:


XML
<request version='1.0'>
  <header>...</header>
  <method>
    <GetUserMultiFactorAuthentication>
      <UserID>User.1.1</UserID>
    </GetUserMultiFactorAuthentication>
  </method>
</request>

The response returns a status of 0 (disabled). In addition, the OTPNotifyMethod value of 0 indicates that the user has never enabled two-step authentication:


XML
<response version="1.0">
  <header>
    <sessionClosed/>
  </header>
  <method>
    <GetUserMultiFactorAuthentication>
      <UserMultiFactorAuthentication>
        <TwoWayAuthMode>0</TwoWayAuthMode>
        <OTPNotifyMethod>0</OTPNotifyMethod>
      </UserMultiFactorAuthentication>
    </GetUserMultiFactorAuthentication>
  </method>
  <_status>OK</_status>
  <_systime>2017-09-27T22:45:07</_systime>
  <!-- Cost 16 mill seconds. -->
</response>