Skip to main content
DELETE
https://{tenantDomain}/api/v2
/
users
/
{id}
/
identities
/
{provider}
/
{user_id}
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new ManagementClient(
            token: "<token>"
        );

        await client.Users.Identities.DeleteAsync(
            "id",
            UserIdentityProviderEnum.Ad,
            "user_id"
        );
    }

}
package example

import (
context "context"

management "github.com/auth0/go-auth0/management/management"
client "github.com/auth0/go-auth0/management/management/client"
option "github.com/auth0/go-auth0/management/management/option"
)

func do() {
client := client.NewClient(
option.WithToken(
"<token>",
),
)
client.Users.Identities.Delete(
context.TODO(),
"id",
management.UserIdentityProviderEnumAd.Ptr(),
"user_id",
)
}
package com.example.usage;

import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.types.UserIdentityProviderEnum;

public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.token("<token>")
.build();

client.users().identities().delete("id", UserIdentityProviderEnum.AD, "user_id");
}
}
<?php

namespace Example;

use Auth0\SDK\API\Management\Management;
use Auth0\SDK\API\Management\Types\UserIdentityProviderEnum;

$client = new Management(
token: '<token>',
);
$client->users->identities->delete(
'id',
UserIdentityProviderEnum::Ad->value,
'user_id',
);
from auth0.management import ManagementClient

client = ManagementClient(
token="<token>",
)

client.users.identities.delete(
id="id",
provider="ad",
user_id="user_id",
)
require "auth0"

client = Auth0::Management.new(token: "<token>")

client.users.identities.delete(
id: "id",
provider: "ad",
user_id: "user_id"
)
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.users.identities.delete("id", "ad", "user_id");
}
main();
import { ManagementClient } from "auth0";

async function main() {
const client = new ManagementClient({
token: "<token>",
});
await client.users.identities.delete("id", "ad", "user_id");
}
main();
curl --request DELETE \
--url https://{tenantDomain}/api/v2/users/{id}/identities/{provider}/{user_id} \
--header 'Authorization: Bearer <token>'
[
  {
    "connection": "Initial-Connection",
    "user_id": "abc",
    "provider": "auth0",
    "isSocial": true,
    "access_token": "<string>",
    "access_token_secret": "<string>",
    "refresh_token": "<string>",
    "profileData": {
      "email": "<string>",
      "email_verified": true,
      "name": "<string>",
      "username": "johndoe",
      "given_name": "<string>",
      "phone_number": "<string>",
      "phone_verified": true,
      "family_name": "<string>"
    }
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

ID of the primary user account.

provider
enum<string>
required

Identity provider name of the secondary linked account (e.g. google-oauth2). The type of identity provider

Available options:
ad,
adfs,
amazon,
apple,
dropbox,
bitbucket,
auth0-oidc,
auth0,
baidu,
bitly,
box,
custom,
daccount,
dwolla,
email,
evernote-sandbox,
evernote,
exact,
facebook,
fitbit,
github,
google-apps,
google-oauth2,
instagram,
ip,
line,
linkedin,
oauth1,
oauth2,
office365,
oidc,
okta,
paypal,
paypal-sandbox,
pingfederate,
planningcenter,
salesforce-community,
salesforce-sandbox,
salesforce,
samlp,
sharepoint,
shopify,
shop,
sms,
soundcloud,
thirtysevensignals,
twitter,
untappd,
vkontakte,
waad,
weibo,
windowslive,
wordpress,
yahoo,
yandex
user_id
string
required

ID of the secondary linked account (e.g. 123456789081523216417 part after the | in google-oauth2|123456789081523216417).

Response

User identity successfully unlinked.

connection
string
default:Initial-Connection
required

The name of the connection for the identity.

user_id
default:abc
required

The unique identifier for the user for the identity.

Minimum string length: 1
provider
string
default:auth0
required

The type of identity provider.

isSocial
boolean

true if the identity provider is a social provider, falses otherwise

access_token
string

IDP access token returned only if scope read:user_idp_tokens is defined

access_token_secret
string

IDP access token secret returned only if scope read:user_idp_tokens is defined.

refresh_token
string

IDP refresh token returned only if scope read:user_idp_tokens is defined.

profileData
object