# Management api bug or docs issue - unlink user identity always returns 200

**URL:** <https://community.auth0.com/t/management-api-bug-or-docs-issue-unlink-user-identity-always-returns-200/6696>\
**Category:** Get Help\
**Tags:** api, identity, delete, bug\
**Created:** [May 20, 2017, 8:09am UTC](https://community.auth0.com/t/management-api-bug-or-docs-issue-unlink-user-identity-always-returns-200/6696 "2017-05-20T08:09:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cory](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cory/32/6270_2.png) [@cory](https://community.auth0.com/u/cory)\
**Post date:** [May 20, 2017, 8:09am UTC](https://community.auth0.com/t/management-api-bug-or-docs-issue-unlink-user-identity-always-returns-200/6696/1 "2017-05-20T08:09:00Z")

</div>

[Unlinking an identity](https://auth0.com/docs/api/management/v2#!/Users/delete_provider_by_user_id) from a user always returns http 200 regardless of input as long as primary account is valid.

1. Enter a valid user for `id`
2. Choose a provider at random
3. Enter any value for `user_id`. It can be a valid user\_id or a completely made up string of random characters.

The response code is always 200.

The docs say this code means:

> The identity was removed from identities array. See Response Class below for schema.

Either that’s incorrect or there is a bug here.

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [May 22, 2017, 5:19am UTC](https://community.auth0.com/t/management-api-bug-or-docs-issue-unlink-user-identity-always-returns-200/6696/2 "2017-05-22T05:19:05Z")

</div>

I have reproduced this and logged the issue with the API team, however I can’t commit to an ETA for the fix. Thanks for bringing this to our attention

---

<div class="post-metadata">

**Author:** ![cory](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cory/32/6270_2.png) [@cory](https://community.auth0.com/u/cory)\
**Post date:** [May 23, 2017, 1:14am UTC](https://community.auth0.com/t/management-api-bug-or-docs-issue-unlink-user-identity-always-returns-200/6696/3 "2017-05-23T01:14:40Z")

</div>

There is a second, similar issue here too. In the docs, [Auth0 Management API v2](https://auth0.com/docs/api/management/v2#!/Connections/delete_connections_by_id) says “Deletes a connection and all its users” however if a user is a linked identity, the linked identity will remain even after the connection is removed.

Not sure if that’s the correct behavior, but it should probably be documented:

“Deletes a connection and all its users except for linked identities, which must be manually deleted from each individual user.”

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:54am UTC](https://community.auth0.com/t/management-api-bug-or-docs-issue-unlink-user-identity-always-returns-200/6696/4 "2018-03-02T05:54:02Z")

</div>


