# User Delete API：Error code: 1107, Message: You can not disassociate a user with managed domain

**URL:** <https://devforum.zoom.us/t/user-delete-api-error-code-1107-message-you-can-not-disassociate-a-user-with-managed-domain/115204>\
**Category:** API and Webhooks\
**Created:** [August 7, 2024, 11:51am UTC](https://devforum.zoom.us/t/user-delete-api-error-code-1107-message-you-can-not-disassociate-a-user-with-managed-domain/115204 "2024-08-07T11:51:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![t.fujita](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/t.fujita/32/58172_2.png) [@t.fujita](https://devforum.zoom.us/u/t.fujita)\
**Post date:** [August 7, 2024, 11:51am UTC](https://devforum.zoom.us/t/user-delete-api-error-code-1107-message-you-can-not-disassociate-a-user-with-managed-domain/115204/1 "2024-08-07T11:51:05Z")

</div>

**API Endpoint(s) and/or Zoom API Event(s)**  
`https://developers.zoom.us/docs/api/rest/reference/user/methods/#operation/userDelete`

**Description**  
We integrated Zoom API with our service to manage users from our system.  
One of our customer encountered the following error when they trie to delete User using userDelete API.  
The customer uses Okta provisioning to create account but as for delete they tried from our service.  
We tried to set up Okta provisioning on our account but not able to reproduce the issue.  
userDelete API worked as expected.

**Error?**  
`Error code: 1107, Message: You can not disassociate a user with managed domain`

**How To Reproduce**  
We tried to set up Okta provisioning on our account but not able to reproduce the issue.  
userDelete API worked as expected

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [August 9, 2024, 8:56pm UTC](https://devforum.zoom.us/t/user-delete-api-error-code-1107-message-you-can-not-disassociate-a-user-with-managed-domain/115204/2 "2024-08-09T20:56:05Z")

</div>

Hi,

To correctly delete a user from a managed domain, you need to specify the `action=delete` in the **query parameters** of your API request, not in the request body.

Let me know if this helps.

---

<div class="post-metadata">

**Author:** ![t.fujita](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/t.fujita/32/58172_2.png) [@t.fujita](https://devforum.zoom.us/u/t.fujita)\
**Post date:** [August 12, 2024, 11:15am UTC](https://devforum.zoom.us/t/user-delete-api-error-code-1107-message-you-can-not-disassociate-a-user-with-managed-domain/115204/3 "2024-08-12T11:15:31Z")

</div>

Hi Ojus,

We use action=delete for “active” user and action= disassociate for “pending” and “inactive” user.  
This is part of code calling Delete user

```auto
 let user = {};
      try {
        user = await this.getUserById(userObj.getIdentifier());
      } catch (err) {
        return resolve({
          operation: 'getUser',
          cloudapp: constants.ZOOM_CONNECTION,
          input: userObj.toJson(),
          error: constants.errorCodes.NOT_FOUND_ERROR,
          errorDetails: err.error.message,
        });
      }

      // If user is active, need to call delete user API with delete as action
      // If user is yet to accept invite, status will be pending and action needs to be sent as disassociate
      let action = 'disassociate';
      if (user.status === 'active') {
        action = 'delete';
      }
      let queryParams = {
        action: action,
      };

      const options = {
        method: 'DELETE',
        headers: {
          Authorization: `Bearer ${this.authClient.getAccessToken()}`,
        },
        json: true,
      };

      const url = `${adminApiUrl}/users/${userObj.getIdentifier()}?${Object.entries(queryParams)
        .map((e) => e.join('='))
        .join('&')}`;
      fetch(url, options)

```

---

<div class="post-metadata">

**Author:** ![ojus.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ojus.zoom/32/734_2.png) [@ojus.zoom](https://devforum.zoom.us/u/ojus.zoom)\
**Post date:** [August 14, 2024, 8:27pm UTC](https://devforum.zoom.us/t/user-delete-api-error-code-1107-message-you-can-not-disassociate-a-user-with-managed-domain/115204/4 "2024-08-14T20:27:47Z")

</div>

Please send me your account details and the tracking\_id for the request. Would like to debug further to understand the root cause.

---

<div class="post-metadata">

**Author:** ![t.fujita](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/t.fujita/32/58172_2.png) [@t.fujita](https://devforum.zoom.us/u/t.fujita)\
**Post date:** [August 16, 2024, 4:14am UTC](https://devforum.zoom.us/t/user-delete-api-error-code-1107-message-you-can-not-disassociate-a-user-with-managed-domain/115204/5 "2024-08-16T04:14:23Z")

</div>

Hello Ojus,

I really appreciate you taking the time to check the issue.  
May I know where tracking\_id is found?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [August 19, 2025, 7:50pm UTC](https://devforum.zoom.us/t/user-delete-api-error-code-1107-message-you-can-not-disassociate-a-user-with-managed-domain/115204/6 "2025-08-19T19:50:53Z")

</div>

This topic was automatically closed 368 days after the last reply. New replies are no longer allowed.
