C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Connections;
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.Connections.DirectoryProvisioning.SetAsync(
id: "id",
request: new ReplaceSynchronizedGroupsRequestContent {
Groups = new List<SynchronizedGroupPayload>(){
new SynchronizedGroupPayload {
Id = "id"
},
}
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent;
import com.auth0.client.mgmt.types.SynchronizedGroupPayload;
import java.util.Arrays;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.connections().directoryProvisioning().set(
"id",
ReplaceSynchronizedGroupsRequestContent
.builder()
.groups(
Arrays.asList(
SynchronizedGroupPayload
.builder()
.id("id")
.build()
)
)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Connections\DirectoryProvisioning\Requests\ReplaceSynchronizedGroupsRequestContent;
use Auth0\SDK\API\Management\Types\SynchronizedGroupPayload;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->connections->directoryProvisioning->set(
'id',
new ReplaceSynchronizedGroupsRequestContent([
'groups' => [
new SynchronizedGroupPayload([
'id' => 'id',
]),
],
]),
);
from auth0.management import ManagementClient, SynchronizedGroupPayload
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.connections.directory_provisioning.set(
id="id",
groups=[
SynchronizedGroupPayload(
id="id",
)
],
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.connections.directory_provisioning.set(
id: "id",
groups: [{
id: "id"
}]
)
curl --request PUT \
--url https://{tenantDomain}/api/v2/connections/{id}/directory-provisioning/synchronized-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"groups": [
{
"id": "<string>",
"direct_members_count": 1073741823,
"email": "jsmith@example.com",
"name": "<string>"
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
groups: [
{
id: '<string>',
direct_members_count: 1073741823,
email: 'jsmith@example.com',
name: '<string>'
}
]
})
};
fetch('https://{tenantDomain}/api/v2/connections/{id}/directory-provisioning/synchronized-groups', 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/connections/{id}/directory-provisioning/synchronized-groups"
payload := strings.NewReader("{\n \"groups\": [\n {\n \"id\": \"<string>\",\n \"direct_members_count\": 1073741823,\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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))
}Créer ou remplacer les sélections de groupes synchronisés pour une configuration de provisionnement d’annuaire
Crée ou remplace les groupes sélectionnés pour la configuration de provisionnement du répertoire d’une connexion.
PUT
https://{tenantDomain}/api/v2
/
connections
/
{id}
/
directory-provisioning
/
synchronized-groups
C#
using Auth0.ManagementApi;
using System.Threading.Tasks;
using Auth0.ManagementApi.Connections;
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.Connections.DirectoryProvisioning.SetAsync(
id: "id",
request: new ReplaceSynchronizedGroupsRequestContent {
Groups = new List<SynchronizedGroupPayload>(){
new SynchronizedGroupPayload {
Id = "id"
},
}
}
);
}
}
package com.example.usage;
import com.auth0.client.mgmt.ManagementApi;
import com.auth0.client.mgmt.connections.types.ReplaceSynchronizedGroupsRequestContent;
import com.auth0.client.mgmt.types.SynchronizedGroupPayload;
import java.util.Arrays;
public class Example {
public static void main(String[] args) {
ManagementApi client = ManagementApi
.builder()
.domain("{YOUR_DOMAIN}")
.token("<token>")
.build();
client.connections().directoryProvisioning().set(
"id",
ReplaceSynchronizedGroupsRequestContent
.builder()
.groups(
Arrays.asList(
SynchronizedGroupPayload
.builder()
.id("id")
.build()
)
)
.build()
);
}
}<?php
namespace Example;
use Auth0\SDK\API\Management\Wrapper\ManagementClient;
use Auth0\SDK\API\Management\Wrapper\ManagementClientOptions;
use Auth0\SDK\API\Management\Connections\DirectoryProvisioning\Requests\ReplaceSynchronizedGroupsRequestContent;
use Auth0\SDK\API\Management\Types\SynchronizedGroupPayload;
$client = new ManagementClient(new ManagementClientOptions(
domain: '{YOUR_DOMAIN}',
token: '<token>',
));
$client->connections->directoryProvisioning->set(
'id',
new ReplaceSynchronizedGroupsRequestContent([
'groups' => [
new SynchronizedGroupPayload([
'id' => 'id',
]),
],
]),
);
from auth0.management import ManagementClient, SynchronizedGroupPayload
client = ManagementClient(
domain="{YOUR_DOMAIN}",
token="<token>",
)
client.connections.directory_provisioning.set(
id="id",
groups=[
SynchronizedGroupPayload(
id="id",
)
],
)
require "auth0"
client = Auth0::Management.new(token: "<token>", base_url: "https://{YOUR_DOMAIN}/api/v2")
client.connections.directory_provisioning.set(
id: "id",
groups: [{
id: "id"
}]
)
curl --request PUT \
--url https://{tenantDomain}/api/v2/connections/{id}/directory-provisioning/synchronized-groups \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"groups": [
{
"id": "<string>",
"direct_members_count": 1073741823,
"email": "jsmith@example.com",
"name": "<string>"
}
]
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
groups: [
{
id: '<string>',
direct_members_count: 1073741823,
email: 'jsmith@example.com',
name: '<string>'
}
]
})
};
fetch('https://{tenantDomain}/api/v2/connections/{id}/directory-provisioning/synchronized-groups', 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/connections/{id}/directory-provisioning/synchronized-groups"
payload := strings.NewReader("{\n \"groups\": [\n {\n \"id\": \"<string>\",\n \"direct_members_count\": 1073741823,\n \"email\": \"jsmith@example.com\",\n \"name\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", 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))
}Autorisations
bearerAuthoAuth2ClientCredentials
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Paramètres de chemin
L’ID de la connexion pour laquelle créer ou remplacer les groupes synchronisés
Corps
application/jsonapplication/x-www-form-urlencoded
Tableau d’objets de groupe Google Workspace Directory à synchroniser.
Show child attributes
Show child attributes
Réponse
Aucun contenu