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 Name | Type | Required? | Description |
|---|---|---|---|
UserID | String | Yes | This is the object ID of the SmartOffice user account. |
Reference
The response contains the following elements:
| Element | Description | Possible Values |
|---|---|---|
TwoWayAuthMode | Specifies whether two-step authentication is enabled. | 0 (disabled) or 1 (enabled) |
OTPNotifyMethod | Specifies 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:
<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:
<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>