PUT - Change TFA Status for a User
Purpose
The API is used to change the TFA preference of a user from enabled to disabled or vice-versa.
OAuth Scope
Use the scope
ZohoMail.organization.accounts.ALL (or) ZohoMail.organization.accounts.UPDATE
to generate the Authtoken.
ALL - Grants full access to accounts.
UPDATE - Grants update access to accounts.
Request URL
Method: GET
https://mail.zoho.com/api/organization/{zoid}/accounts/{zuid}
Path Parameters
- zoid* long
- This parameter denotes the unique Zoho Organization Identifier for the organization.
- This value can be retrieved using the GET organization details API.
- zuid* long
- This parameter denotes the unique identifier for each user in an organization.
- This value can be retrieved using the GET all org user details API.
Request Body (JSON Object)
- mode* string
- This parameter represents the type of operation that is to be performed.
- Provide the value as updateTFAStatus.
- tfaEnabled* boolean
- This parameter specifies whether to enable or disable the Two Factor Authentication for this user.
- Allowed values:
- true -To enable TFA.
- false -To disable TFA.
* - Mandatory parameter
Response Codes
Refer here for the response codes and their meaning.
Sample Request
Copiedcurl "https://mail.zoho.com/api/organization/1234567890/accounts/111111156" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken *****" \
-d '{
"tfaEnabled": true,
"mode": "updateTFAStatus"
}'
Sample Response
Copied{
"status": {
"code": 200,
"description": "success"
}
}