Remove a team member's tenant access
curl --request DELETE \
--url https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenants": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants"
payload = { "tenants": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tenants: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'tenants' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants"
payload := strings.NewReader("{\n \"tenants\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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))
}HttpResponse<String> response = Unirest.delete("https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenants\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenants\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status_code": 123,
"message": "<string>",
"summary": {
"total_count": 123,
"success_count": 123,
"failure_count": 123
},
"success": [
{
"tenant_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"failure": [
{
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>"
}
]
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}This endpoint can be used to remove tenant access
DELETE
https://{teamSlug}.teams.auth0.com
/
api
/
members
/
{id}
/
tenants
Remove a team member's tenant access
curl --request DELETE \
--url https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenants": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants"
payload = { "tenants": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tenants: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'tenants' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants"
payload := strings.NewReader("{\n \"tenants\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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))
}HttpResponse<String> response = Unirest.delete("https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenants\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenants\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"status_code": 123,
"message": "<string>",
"summary": {
"total_count": 123,
"success_count": 123,
"failure_count": 123
},
"success": [
{
"tenant_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
],
"failure": [
{
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": 123,
"title": "<string>",
"type": "<string>"
}
]
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}{
"status": "<unknown>",
"type": "<string>",
"title": "<string>",
"details": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique ID of the team member.
Body
application/json
The tenants to remove for the team member.
Specifies list of tenant IDs to be removed
Required array length:
1 - 10 elementsUnique identifier of the tenant
Response
Operation completed with errors
Status code for partial response
Describing the partial error scenario
Summary of the bulk tenant operation
Show child attributes
Show child attributes
List of all tenant ids that were removed
Show child attributes
Show child attributes
List of failed instances
Show child attributes
Show child attributes
Was this page helpful?
⌘I