{"_id":"5bb272e51da2590003732877","project":"569f9cf6650e1d1900f96b5b","version":{"_id":"569f9cf6650e1d1900f96b5e","project":"569f9cf6650e1d1900f96b5b","__v":12,"createdAt":"2016-01-20T14:43:02.785Z","releaseDate":"2016-01-20T14:43:02.785Z","categories":["569f9cf7650e1d1900f96b5f","56abdd81d4432d1900eed235","56abe0558beeff0d003b8118","56ad2f8b1c09150d00a183a8","56ad4e1cd21f1b0d00fd2f97","56b00ad88f7a4f0d0029dc92","56b2432e9621f20d00efb2bd","56b25826147e900d00d6497a","56b7af2a4b372d2100722c48","56b8c4d938b1070d0028920f","56b8cdab14feef0d0082415d","58599813cf9e112d0032cdab"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"56b25826147e900d00d6497a","project":"569f9cf6650e1d1900f96b5b","version":"569f9cf6650e1d1900f96b5e","pages":["56b2583a9621f20d00efb31c","56b25a3965ddf50d0076baa2","56b2738894ab060d0006743c","56b4d1cf5f1cf00d00cc46d7","56b4f4e2b1a8690d00a59369","56b4f6925f1cf00d00cc4704","56b4fa3d5997532100bc6bcc","56b50ba8eed075230097d71e","56b5123585a6922300d1c506","56b51e475997532100bc6c08","56b5220b7719bb1900143055","56b524cc3d5f130d00dad1b8","56b5265b168b5c1700c15996","56b774438fb4420d006a618b","56b78012eb783a0d007894f3","56b78292a6c10c0d00a2d65d","56b7863aeb783a0d007894f8","56b78f68a6c10c0d00a2d66b","56b794566c2a240d0094ae8a","56b7a85dd22adc0d0053f4c2","56b7ac118fb4420d006a61b7"],"__v":21,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-03T19:42:30.051Z","from_sync":false,"order":7,"slug":"user-methods","title":"User methods"},"user":"5ae8c2a466355e0003269bc6","__v":0,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-10-01T19:17:57.546Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"## Syntax \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    <credentials object>, \\n    \\\"user\\\": <mailbox_name>, \\n    \\\"role\\\": \\\"role_name\\\", \\n    \\\"object\\\": \\\"admin_object\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Request fields for user_disable_2fa\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"user\",\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Obligation\",\n    \"0-2\": \"The user you wish to disable 2FA for\",\n    \"h-2\": \"Definition/Value\",\n    \"0-1\": \"Required\"\n  },\n  \"cols\": 3,\n  \"rows\": null\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Response fields for set_role\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Obligation\",\n    \"h-2\": \"Description/Value\",\n    \"0-0\": \"error\",\n    \"0-1\": \"Returned if **success = false**\",\n    \"0-2\": \"A text string that explains the error.\",\n    \"1-0\": \"error_number\",\n    \"1-1\": \"Returned if **success = false**\",\n    \"1-2\": \"A number that represents the error.\",\n    \"2-0\": \"success\",\n    \"2-1\": \"Always returned.\",\n    \"2-2\": \"Indicates whether the request was successful or not. Allowed values are **true** and **false**.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"You can determine whether a user has 2FA enabled via the get_user call.\",\n  \"title\": \"Determine whether 2FA is enabled\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Examples for set_role\"\n}\n[/block]\n**Request 1**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"credentials\\\": {\\n\\\"user\\\": \\\"company_admin:::at:::resellerusername.adm\\\",\\n    \\\"password\\\": \\\"password\\\"\\n  },\\n  \\\"user\\\": \\\"domain_admin@customerdomain1.com\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]\n**Response 1**\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n\\t\\\"success\\\": true,\\n\\t\\\"audit\\\": \\\"month72_56b3b161b\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"The **user_disable_2fa** method turns off Two-Factor Authentication for the given user.","slug":"user_disable_2fa","type":"basic","title":"user_disable_2fa"}

user_disable_2fa

The **user_disable_2fa** method turns off Two-Factor Authentication for the given user.

## Syntax [block:code] { "codes": [ { "code": "{\n <credentials object>, \n \"user\": <mailbox_name>, \n \"role\": \"role_name\", \n \"object\": \"admin_object\"\n}", "language": "json" } ] } [/block] [block:api-header] { "title": "Request fields for user_disable_2fa" } [/block] [block:parameters] { "data": { "0-0": "user", "h-0": "Field name", "h-1": "Obligation", "0-2": "The user you wish to disable 2FA for", "h-2": "Definition/Value", "0-1": "Required" }, "cols": 3, "rows": null } [/block] [block:api-header] { "title": "Response fields for set_role" } [/block] [block:parameters] { "data": { "h-0": "Field name", "h-1": "Obligation", "h-2": "Description/Value", "0-0": "error", "0-1": "Returned if **success = false**", "0-2": "A text string that explains the error.", "1-0": "error_number", "1-1": "Returned if **success = false**", "1-2": "A number that represents the error.", "2-0": "success", "2-1": "Always returned.", "2-2": "Indicates whether the request was successful or not. Allowed values are **true** and **false**." }, "cols": 3, "rows": 3 } [/block] [block:callout] { "type": "info", "body": "You can determine whether a user has 2FA enabled via the get_user call.", "title": "Determine whether 2FA is enabled" } [/block] [block:api-header] { "title": "Examples for set_role" } [/block] **Request 1** [block:code] { "codes": [ { "code": "{\n \"credentials\": {\n\"user\": \"company_admin@resellerusername.adm\",\n \"password\": \"password\"\n },\n \"user\": \"domain_admin@customerdomain1.com\"\n}", "language": "json" } ] } [/block] **Response 1** [block:code] { "codes": [ { "code": "{\n\t\"success\": true,\n\t\"audit\": \"month72_56b3b161b\"\n}", "language": "json" } ] } [/block]