- Démarrage
- Authentification
- Étendues et autorisations
- API de gestion de plate-forme
Résoudre le point de terminaison de l'API Entité d'annuaire pour rechercher une entité d'annuaire unique par identifiant et type uniques à l'aide de l'ID de l'organisation dans Test Cloud.
Résout une entité d'annuaire unique par son identifiant et son type uniques, en fonction de l'ID de l'organisation.
Point de terminaison de l’API
POST {accessURL}/{organizationName}/identity_/api/Directory/Resolve/{partitionGlobalId}
Remplacez {accessURL} dans tous les chemins de point de terminaison par l'URL de base de votre plate-forme cloud :
| Cloud Platform | URL d'accès |
|---|---|
| Test Cloud | https://cloud.uipath.com/ |
| Test Cloud Secteur Public | https://govcloud.uipath.us/ |
| Test Cloud dédié | https://{customURL}.dedicated.uipath.com/ |
Étendues
Nécessite les étendues suivantes :
- PM.Répertoire
En-têtes de requête.
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'\
--header 'Content-Type: application/json'
Pour obtenir le {access_token}, assurez-vous de vous authentifier via l'une des méthodes décrites ici.
Paramètres de chemin d'accès
| Paramètre du chemin d'accès | Type de données | Description |
|---|---|---|
partitionGlobalId (requis) | Chaîne (GUID) | L’ID de l’organisation dans lequel résoudre l’entité. |
Corps de la requête
Le corps de la requête spécifie l'entité à résoudre.
{
"entityId": "string",
"entityType": "User"
}
{
"entityId": "string",
"entityType": "User"
}
| Propriété | Type de données | Description |
|---|---|---|
entityId (requis) | Chaîne de caractères (string) | L'identifiant unique de l'entité d'annuaire. |
entityType (requis) | Chaîne de caractères (string) | Type d'entité d'annuaire. Valeurs valides: User, Group, Application. |
Réponses
200 OK
Renvoie l’entité de répertoire complète. La forme de la réponse varie en fonction du type d'entité.
Réponse de l’utilisateur
{
"objectType": "DirectoryUser",
"source": "aad",
"identifier": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "john.doe@example.com",
"email": "john.doe@example.com",
"displayName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"jobTitle": "Software Engineer",
"companyName": "Contoso",
"city": "Seattle",
"department": "Engineering",
"isActive": true,
"creationTime": "2025-01-15T10:30:00Z"
}
{
"objectType": "DirectoryUser",
"source": "aad",
"identifier": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "john.doe@example.com",
"email": "john.doe@example.com",
"displayName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"jobTitle": "Software Engineer",
"companyName": "Contoso",
"city": "Seattle",
"department": "Engineering",
"isActive": true,
"creationTime": "2025-01-15T10:30:00Z"
}
Réponse de groupe
{
"objectType": "DirectoryGroup",
"source": "aad",
"identifier": "aad|b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Engineering Team",
"email": null,
"displayName": "Engineering Team",
"externalId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
{
"objectType": "DirectoryGroup",
"source": "aad",
"identifier": "aad|b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "Engineering Team",
"email": null,
"displayName": "Engineering Team",
"externalId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
}
Réponse de l'application
{
"objectType": "DirectoryApplication",
"source": "aad",
"identifier": "aad|c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "My Application",
"email": null,
"displayName": "My Application",
"applicationId": "c3d4e5f6-a7b8-9012-cdef-123456789012"
}
{
"objectType": "DirectoryApplication",
"source": "aad",
"identifier": "aad|c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "My Application",
"email": null,
"displayName": "My Application",
"applicationId": "c3d4e5f6-a7b8-9012-cdef-123456789012"
}
Erreur 404 - Page introuvable
Renvoyé lorsque l’entité ou la partition est introuvable.
Exemple de requête
Supposons que vous ayez rassemblé toutes les informations nécessaires pour créer l'appel d'API.
- Votre
{baseURL}est : https://cloud.uipath.com/{organizationName}/identity_ - Votre
{access_token}est :1234(pour des considérations de longueur). - Le
{partitionGlobalId}est :3fa85f64-5717-4562-b3fc-2c963f66afa6 - Vous souhaitez résoudre un utilisateur avec l’ID
aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890.
L’appel doit ressembler à l’exemple suivant (cURL) :
curl --location --request POST 'https://cloud.uipath.com/{organizationName}/identity_/api/Directory/Resolve/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"entityId": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"entityType": "User"
}'
curl --location --request POST 'https://cloud.uipath.com/{organizationName}/identity_/api/Directory/Resolve/3fa85f64-5717-4562-b3fc-2c963f66afa6' \
--header 'Authorization: Bearer 1234' \
--header 'Content-Type: application/json' \
--data-raw '{
"entityId": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"entityType": "User"
}'
Voici la réponse pour un appel réussi :
{
"objectType": "DirectoryUser",
"source": "aad",
"identifier": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "john.doe@example.com",
"email": "john.doe@example.com",
"displayName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"jobTitle": "Software Engineer",
"companyName": "Contoso",
"city": "Seattle",
"department": "Engineering",
"isActive": true,
"creationTime": "2025-01-15T10:30:00Z"
}
{
"objectType": "DirectoryUser",
"source": "aad",
"identifier": "aad|a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "john.doe@example.com",
"email": "john.doe@example.com",
"displayName": "John Doe",
"firstName": "John",
"lastName": "Doe",
"jobTitle": "Software Engineer",
"companyName": "Contoso",
"city": "Seattle",
"department": "Engineering",
"isActive": true,
"creationTime": "2025-01-15T10:30:00Z"
}