API call description
In specific scenarios where you need to urgently force the sign-out of an Enterprise Account, call this API to perform the forced sign-out. After sign-out, DingTalk on the user’s side displays as shown below:Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/contact/orgAccounts/signOut |
| HTTP Method | POST |
| Supported app type | appType-Internal app |
| Permissions required | permission-Contact.OrgAccountSecurity.ReadWrite-Read and write permissions for Contacts Enterprise Account security data |
Request header
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling this API. Obtain it by calling Get the access token of an internal app. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| userId | String | Yes | The user ID of the Enterprise Account. Obtain it through one of the following four methods: - Get the user ID by mobile phone number - Create an SSO Enterprise Account - Create a DingTalk-created Enterprise Account - Invite Enterprise Accounts from other organizations to join |
| reason | String | No | The reason for forcing the sign-out of the Enterprise Account (displayed in the audit log of the DingTalk admin console). |
| reasonI18nForEmployee | Map<String, String> | No | - The reason for forcing the sign-out of the Enterprise Account (displayed to the employee). - Example: {"zh_CN":"Reason for logging out","en_US":"Reason for logging out"} - Supported languages refer to the current language of the DingTalk client. For example: zh_CN, zh_HK, zh_TW, en_US, ja_JP, vi_VN, fr_FR, ru_RU, ko_KR, es_LA, tr_TR, pt_BR, ms_MY, id_ID, th_TH. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| result | Boolean | Whether the sign-out succeeded. true indicates success. |
Response body example
Error codes
If the API call returns an error, refer to the Global error codes document and find a solution based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | invalid.param | Invalid parameter | Invalid parameter |
| 400 | user.not.exist | User does not exist | User does not exist |
| 400 | exclusive.account.only | Only dedicated accounts belonging to this organization can be operated on | Only dedicated accounts belonging to this organization can be operated on |
| 500 | system.busy | System busy | System busy |