Update a team member's tenant access
curl --request PATCH \
--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"
],
"roles": [],
"client_ids": [
"<string>"
]
}
'import requests
url = "https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants"
payload = {
"tenants": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"roles": [],
"client_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenants: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
roles: [],
client_ids: ['<string>']
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'tenants' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'roles' => [
],
'client_ids' => [
'<string>'
]
]),
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 \"roles\": [],\n \"client_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("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 \"roles\": [],\n \"client_ids\": [\n \"<string>\"\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::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenants\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"roles\": [],\n \"client_ids\": [\n \"<string>\"\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_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"roles": [],
"client_ids": [
"<string>"
]
}
],
"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>"
}Update a team member's tenant access
This endpoint can be used to update existing tenant roles.
PATCH
https://{teamSlug}.teams.auth0.com
/
api
/
members
/
{id}
/
tenants
Update a team member's tenant access
curl --request PATCH \
--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"
],
"roles": [],
"client_ids": [
"<string>"
]
}
'import requests
url = "https://{teamSlug}.teams.auth0.com/api/members/{id}/tenants"
payload = {
"tenants": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"roles": [],
"client_ids": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenants: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
roles: [],
client_ids: ['<string>']
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'tenants' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'roles' => [
],
'client_ids' => [
'<string>'
]
]),
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 \"roles\": [],\n \"client_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("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 \"roles\": [],\n \"client_ids\": [\n \"<string>\"\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::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenants\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"roles\": [],\n \"client_ids\": [\n \"<string>\"\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_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"roles": [],
"client_ids": [
"<string>"
]
}
],
"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>"
}Autorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Paramètres de chemin
The unique ID of the team member to update
Corps
application/json
The tenants and roles to update for the team member.
A list of tenant ids
Required array length:
1 - 10 elementsUnique identifier of the tenant
List of roles to be assigned to the tenant member
Tenant Member Role
Options disponibles:
owner, editor-connections, editor-users, editor-specific-apps, editor-organizations, viewer-config, viewer-users, support-access, elevated-support-access, editor-kms List of applications. Only if nested role is editor-specific-app
Required string length:
5 - 50Pattern:
^([0-9a-zA-Z-_@\.~]{5,64})$Réponse
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 successful instances
Show child attributes
Show child attributes
List of failed instances
Show child attributes
Show child attributes
⌘I