C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations;
using System.Collections.Generic;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.Organizations.Clients.DeleteAsync(
id: "id",
request: new DeleteOrganizationClientsRequestContent {
Clients = new List<string>(){
"clients",
}
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.organizations.types.DeleteOrganizationClientsRequestContent;
import java.util.Arrays;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organizations().clients().delete(
"id",
DeleteOrganizationClientsRequestContent
.builder()
.clients(
Arrays.asList("clients")
)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Organizations\Clients\Requests\DeleteOrganizationClientsRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->organizations->clients->delete(
'id',
new DeleteOrganizationClientsRequestContent([
'clients' => [
'clients',
],
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organizations.clients.delete(
id="id",
clients=[
"clients"
],
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.organizations.clients.delete(
id: "id",
clients: ["clients"]
)
curl --request DELETE \
--url https://{tenantDomain}/api/v2/organizations/{id}/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clients": [
"<string>"
]
}
'const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({clients: ['<string>']})
};
fetch('https://{tenantDomain}/api/v2/organizations/{id}/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/organizations/{id}/clients"
payload := strings.NewReader("{\n \"clients\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}Remove client associations from an organization
Remove one or more client associations from an organization.
DELETE
https://{tenantDomain}/api/v2
/
organizations
/
{id}
/
clients
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Organizations;
using System.Collections.Generic;
public partial class Examples
{
public async Task Example() {
var client = new ManagementApiClient(
token: "<token>",
clientOptions: new ClientOptions { BaseUrl = "https://{YOUR_DOMAIN}/api/v2" }
);
await client.Organizations.Clients.DeleteAsync(
id: "id",
request: new DeleteOrganizationClientsRequestContent {
Clients = new List<string>(){
"clients",
}
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.organizations.types.DeleteOrganizationClientsRequestContent;
import java.util.Arrays;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.organizations().clients().delete(
"id",
DeleteOrganizationClientsRequestContent
.builder()
.clients(
Arrays.asList("clients")
)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Organizations\Clients\Requests\DeleteOrganizationClientsRequestContent;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->organizations->clients->delete(
'id',
new DeleteOrganizationClientsRequestContent([
'clients' => [
'clients',
],
]),
);
from auth0.management import ManagementClient
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.organizations.clients.delete(
id="id",
clients=[
"clients"
],
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.organizations.clients.delete(
id: "id",
clients: ["clients"]
)
curl --request DELETE \
--url https://{tenantDomain}/api/v2/organizations/{id}/clients \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clients": [
"<string>"
]
}
'const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({clients: ['<string>']})
};
fetch('https://{tenantDomain}/api/v2/organizations/{id}/clients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenantDomain}/api/v2/organizations/{id}/clients"
payload := strings.NewReader("{\n \"clients\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("DELETE", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}{
"message": "<string>",
"statusCode": "<unknown>",
"error": "<unknown>"
}Authorizations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID of the organization.
Body
application/jsonapplication/x-www-form-urlencoded
List of client IDs to disassociate from the organization.
Required array length:
1 - 10 elementsResponse
Organization clients successfully disassociated.
âI