Identities - Read Identities
Résoudre les informations d’identité héritées à utiliser avec des API plus anciennes, telles que les API de sécurité
GET https://vssps.dev.azure.com/{organization}/_apis/identities?api-version=7.1-preview.1
GET https://vssps.dev.azure.com/{organization}/_apis/identities?descriptors={descriptors}&identityIds={identityIds}&subjectDescriptors={subjectDescriptors}&searchFilter={searchFilter}&filterValue={filterValue}&queryMembership={queryMembership}&api-version=7.1-preview.1
Paramètres URI
Nom | Dans | Obligatoire | Type | Description |
---|---|---|---|---|
organization
|
path |
string |
Nom de l’organisation Azure DevOps. |
|
api-version
|
query | True |
string |
Version de l’API à utiliser. Cette valeur doit être définie sur « 7.1-preview.1 » pour utiliser cette version de l’API. |
descriptors
|
query |
string |
Liste séparée par des virgules des descripteurs d’identité à résoudre |
|
filter
|
query |
string |
Valeur de recherche, comme spécifié par searchFilter. |
|
identity
|
query |
string |
Liste séparée par des virgules des clés de stockage à résoudre |
|
query
|
query |
Informations d’appartenance à inclure avec les identités. Les valeurs peuvent être None pour aucune donnée d’appartenance ou Direct pour inclure les groupes dont l’identité est membre et les identités qui sont membres de cette identité (groupes uniquement) |
||
search
|
query |
string |
Type de recherche à effectuer. Les valeurs peuvent être AccountName (domain\alias), DisplayName, MailAddress, General (nom d’affichage, nom de compte ou nom unique) ou LocalGroupName (rechercher uniquement les groupes Azure Devops). |
|
subject
|
query |
string |
Liste séparée par des virgules des descripteurs d’objet à résoudre |
Réponses
Nom | Type | Description |
---|---|---|
200 OK |
Identity[] |
opération réussie |
Sécurité
oauth2
Type:
oauth2
Flow:
accessCode
Authorization URL:
https://app.vssps.visualstudio.com/oauth2/authorize&response_type=Assertion
Token URL:
https://app.vssps.visualstudio.com/oauth2/token?client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer
Scopes
Nom | Description |
---|---|
vso.identity | Accorde la possibilité de lire des identités et des groupes. |
Exemples
By Email |
By Identity |
By Ids |
By Name |
By Subject Descriptors |
By Email
Sample Request
GET https://vssps.dev.azure.com/fabrikam/_apis/identities?searchFilter=General&filterValue=jtseng@vscsi.us&queryMembership=None&api-version=7.1-preview.1
Sample Response
{
"count": 1,
"value": [
{
"id": "81fa6389-0872-6fdd-a451-7ba7880f566a",
"descriptor": "Microsoft.IdentityModel.Claims.ClaimsIdentity;7a394543-62fd-4274-a7d2-8fac775942b6\\jtseng@vscsi.us",
"subjectDescriptor": "aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4",
"providerDisplayName": "Jia-hao Tseng",
"isActive": true,
"members": [],
"memberOf": [],
"memberIds": [],
"properties": {
"SchemaClassName": {
"$type": "System.String",
"$value": "User"
},
"Description": {
"$type": "System.String",
"$value": ""
},
"Domain": {
"$type": "System.String",
"$value": "7a394543-62fd-4274-a7d2-8fac775942b6"
},
"Account": {
"$type": "System.String",
"$value": "jtseng@vscsi.us"
},
"DN": {
"$type": "System.String",
"$value": ""
},
"Mail": {
"$type": "System.String",
"$value": "jtseng@vscsi.us"
},
"SpecialType": {
"$type": "System.String",
"$value": "Generic"
},
"Alias": {
"$type": "System.String",
"$value": "jtseng"
},
"PUID": {
"$type": "System.String",
"$value": "aad:100FAFF21C1B5261"
},
"ComplianceValidated": {
"$type": "System.DateTime",
"$value": "2020-04-23T00:00:00Z"
},
"http://schemas.microsoft.com/identity/claims/objectidentifier": {
"$type": "System.String",
"$value": "55c8c7b6-7ace-43bc-918f-304dfa2b6317"
},
"MetadataUpdateDate": {
"$type": "System.DateTime",
"$value": "2018-07-10T16:11:40Z"
},
"DirectoryAlias": {
"$type": "System.String",
"$value": "jtseng"
}
},
"resourceVersion": 2,
"metaTypeId": 0
}
]
}
By IdentityDescriptors
Sample Request
GET https://vssps.dev.azure.com/fabrikam/_apis/identities?descriptors=Microsoft.IdentityModel.Claims.ClaimsIdentity;7a394543-62fd-4274-a7d2-8fac775942b6\jtseng@vscsi.us,Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1725938060-2279921994-2555521242-2616350130-0-0-0-0-3&queryMembership=None&api-version=7.1-preview.1
Sample Response
{
"count": 2,
"value": [
{
"id": "81fa6389-0872-6fdd-a451-7ba7880f566a",
"descriptor": "Microsoft.IdentityModel.Claims.ClaimsIdentity;7a394543-62fd-4274-a7d2-8fac775942b6\\jtseng@vscsi.us",
"subjectDescriptor": "aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4",
"providerDisplayName": "Jia-hao Tseng",
"isActive": true,
"members": [],
"memberOf": [],
"memberIds": [],
"properties": {
"SchemaClassName": {
"$type": "System.String",
"$value": "User"
},
"Description": {
"$type": "System.String",
"$value": ""
},
"Domain": {
"$type": "System.String",
"$value": "7a394543-62fd-4274-a7d2-8fac775942b6"
},
"Account": {
"$type": "System.String",
"$value": "jtseng@vscsi.us"
},
"DN": {
"$type": "System.String",
"$value": ""
},
"Mail": {
"$type": "System.String",
"$value": "jtseng@vscsi.us"
},
"SpecialType": {
"$type": "System.String",
"$value": "Generic"
},
"Alias": {
"$type": "System.String",
"$value": "jtseng"
},
"PUID": {
"$type": "System.String",
"$value": "aad:100FAFF21C1B5261"
},
"ComplianceValidated": {
"$type": "System.DateTime",
"$value": "2020-04-23T00:00:00Z"
},
"http://schemas.microsoft.com/identity/claims/objectidentifier": {
"$type": "System.String",
"$value": "55c8c7b6-7ace-43bc-918f-304dfa2b6317"
},
"MetadataUpdateDate": {
"$type": "System.DateTime",
"$value": "2018-07-10T16:11:40Z"
},
"DirectoryAlias": {
"$type": "System.String",
"$value": "jtseng"
}
},
"resourceVersion": 2,
"metaTypeId": 0
},
{
"id": "7c86b535-818b-423f-b0fd-19a2e9f32710",
"descriptor": "Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1725938060-2279921994-2555521242-2616350130-0-0-0-0-3",
"subjectDescriptor": "vssgp.Uy0xLTktMTU1MTM3NDI0NS0xNzI1OTM4MDYwLTIyNzk5MjE5OTQtMjU1NTUyMTI0Mi0yNjE2MzUwMTMwLTAtMC0wLTAtMw",
"providerDisplayName": "[jtseng]\\Project Collection Valid Users",
"isActive": true,
"isContainer": true,
"members": [],
"memberOf": [],
"memberIds": [],
"properties": {
"SchemaClassName": {
"$type": "System.String",
"$value": "Group"
},
"Description": {
"$type": "System.String",
"$value": "This application group contains all users and groups that have access to the Team Project Collection."
},
"Domain": {
"$type": "System.String",
"$value": "vstfs:///Framework/IdentityDomain/8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"Account": {
"$type": "System.String",
"$value": "Project Collection Valid Users"
},
"SecurityGroup": {
"$type": "System.String",
"$value": "SecurityGroup"
},
"SpecialType": {
"$type": "System.String",
"$value": "EveryoneApplicationGroup"
},
"ScopeId": {
"$type": "System.Guid",
"$value": "8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"ScopeType": {
"$type": "System.String",
"$value": "ServiceHost"
},
"LocalScopeId": {
"$type": "System.Guid",
"$value": "8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"SecuringHostId": {
"$type": "System.Guid",
"$value": "e26baa74-481c-42bc-a78c-f2a89decc807"
},
"ScopeName": {
"$type": "System.String",
"$value": "jtseng"
},
"GlobalScope": {
"$type": "System.String",
"$value": "GlobalScope"
},
"VirtualPlugin": {
"$type": "System.String",
"$value": ""
}
},
"resourceVersion": 2,
"metaTypeId": 255
}
]
}
By Ids
Sample Request
GET https://vssps.dev.azure.com/fabrikam/_apis/identities?identityIds=81fa638908726fdda4517ba7880f566a,7c86b535818b423fb0fd19a2e9f32710&queryMembership=None&api-version=7.1-preview.1
Sample Response
{
"count": 2,
"value": [
{
"id": "81fa6389-0872-6fdd-a451-7ba7880f566a",
"descriptor": "Microsoft.IdentityModel.Claims.ClaimsIdentity;7a394543-62fd-4274-a7d2-8fac775942b6\\jtseng@vscsi.us",
"subjectDescriptor": "aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4",
"providerDisplayName": "Jia-hao Tseng",
"isActive": true,
"members": [],
"memberOf": [],
"memberIds": [],
"properties": {
"SchemaClassName": {
"$type": "System.String",
"$value": "User"
},
"Description": {
"$type": "System.String",
"$value": ""
},
"Domain": {
"$type": "System.String",
"$value": "7a394543-62fd-4274-a7d2-8fac775942b6"
},
"Account": {
"$type": "System.String",
"$value": "jtseng@vscsi.us"
},
"DN": {
"$type": "System.String",
"$value": ""
},
"Mail": {
"$type": "System.String",
"$value": "jtseng@vscsi.us"
},
"SpecialType": {
"$type": "System.String",
"$value": "Generic"
},
"Alias": {
"$type": "System.String",
"$value": "jtseng"
},
"PUID": {
"$type": "System.String",
"$value": "aad:100FAFF21C1B5261"
},
"ComplianceValidated": {
"$type": "System.DateTime",
"$value": "2020-04-23T00:00:00Z"
},
"http://schemas.microsoft.com/identity/claims/objectidentifier": {
"$type": "System.String",
"$value": "55c8c7b6-7ace-43bc-918f-304dfa2b6317"
},
"MetadataUpdateDate": {
"$type": "System.DateTime",
"$value": "2018-07-10T16:11:40Z"
},
"DirectoryAlias": {
"$type": "System.String",
"$value": "jtseng"
}
},
"resourceVersion": 2,
"metaTypeId": 0
},
{
"id": "7c86b535-818b-423f-b0fd-19a2e9f32710",
"descriptor": "Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1725938060-2279921994-2555521242-2616350130-0-0-0-0-3",
"subjectDescriptor": "vssgp.Uy0xLTktMTU1MTM3NDI0NS0xNzI1OTM4MDYwLTIyNzk5MjE5OTQtMjU1NTUyMTI0Mi0yNjE2MzUwMTMwLTAtMC0wLTAtMw",
"providerDisplayName": "[jtseng]\\Project Collection Valid Users",
"isActive": true,
"isContainer": true,
"members": [],
"memberOf": [],
"memberIds": [],
"properties": {
"SchemaClassName": {
"$type": "System.String",
"$value": "Group"
},
"Description": {
"$type": "System.String",
"$value": "This application group contains all users and groups that have access to the Team Project Collection."
},
"Domain": {
"$type": "System.String",
"$value": "vstfs:///Framework/IdentityDomain/8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"Account": {
"$type": "System.String",
"$value": "Project Collection Valid Users"
},
"SecurityGroup": {
"$type": "System.String",
"$value": "SecurityGroup"
},
"SpecialType": {
"$type": "System.String",
"$value": "EveryoneApplicationGroup"
},
"ScopeId": {
"$type": "System.Guid",
"$value": "8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"ScopeType": {
"$type": "System.String",
"$value": "ServiceHost"
},
"LocalScopeId": {
"$type": "System.Guid",
"$value": "8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"SecuringHostId": {
"$type": "System.Guid",
"$value": "e26baa74-481c-42bc-a78c-f2a89decc807"
},
"ScopeName": {
"$type": "System.String",
"$value": "jtseng"
},
"GlobalScope": {
"$type": "System.String",
"$value": "GlobalScope"
},
"VirtualPlugin": {
"$type": "System.String",
"$value": ""
}
},
"resourceVersion": 2,
"metaTypeId": 255
}
]
}
By Name
Sample Request
GET https://vssps.dev.azure.com/fabrikam/_apis/identities?searchFilter=General&filterValue=Project Collection Valid Users&queryMembership=None&api-version=7.1-preview.1
Sample Response
{
"count": 1,
"value": [
{
"id": "7c86b535-818b-423f-b0fd-19a2e9f32710",
"descriptor": "Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1725938060-2279921994-2555521242-2616350130-0-0-0-0-3",
"subjectDescriptor": "vssgp.Uy0xLTktMTU1MTM3NDI0NS0xNzI1OTM4MDYwLTIyNzk5MjE5OTQtMjU1NTUyMTI0Mi0yNjE2MzUwMTMwLTAtMC0wLTAtMw",
"providerDisplayName": "[jtseng]\\Project Collection Valid Users",
"isActive": true,
"isContainer": true,
"members": [],
"memberOf": [],
"memberIds": [],
"properties": {
"SchemaClassName": {
"$type": "System.String",
"$value": "Group"
},
"Description": {
"$type": "System.String",
"$value": "This application group contains all users and groups that have access to the Team Project Collection."
},
"Domain": {
"$type": "System.String",
"$value": "vstfs:///Framework/IdentityDomain/8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"Account": {
"$type": "System.String",
"$value": "Project Collection Valid Users"
},
"SecurityGroup": {
"$type": "System.String",
"$value": "SecurityGroup"
},
"SpecialType": {
"$type": "System.String",
"$value": "EveryoneApplicationGroup"
},
"ScopeId": {
"$type": "System.Guid",
"$value": "8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"ScopeType": {
"$type": "System.String",
"$value": "ServiceHost"
},
"LocalScopeId": {
"$type": "System.Guid",
"$value": "8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"SecuringHostId": {
"$type": "System.Guid",
"$value": "e26baa74-481c-42bc-a78c-f2a89decc807"
},
"ScopeName": {
"$type": "System.String",
"$value": "jtseng"
},
"GlobalScope": {
"$type": "System.String",
"$value": "GlobalScope"
},
"VirtualPlugin": {
"$type": "System.String",
"$value": ""
}
},
"resourceVersion": 2,
"metaTypeId": 255
}
]
}
By Subject Descriptors
Sample Request
GET https://vssps.dev.azure.com/fabrikam/_apis/identities?subjectDescriptors=aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4,vssgp.Uy0xLTktMTU1MTM3NDI0NS0xNzI1OTM4MDYwLTIyNzk5MjE5OTQtMjU1NTUyMTI0Mi0yNjE2MzUwMTMwLTAtMC0wLTAtMw&queryMembership=None&api-version=7.1-preview.1
Sample Response
{
"count": 2,
"value": [
{
"id": "81fa6389-0872-6fdd-a451-7ba7880f566a",
"descriptor": "Microsoft.IdentityModel.Claims.ClaimsIdentity;7a394543-62fd-4274-a7d2-8fac775942b6\\jtseng@vscsi.us",
"subjectDescriptor": "aad.MDA0NzBlMzQtZGE2MS03YTY5LWJkOTYtNDg3YTg0OWVjNTU4",
"providerDisplayName": "Jia-hao Tseng",
"isActive": true,
"members": [],
"memberOf": [],
"memberIds": [],
"properties": {
"SchemaClassName": {
"$type": "System.String",
"$value": "User"
},
"Description": {
"$type": "System.String",
"$value": ""
},
"Domain": {
"$type": "System.String",
"$value": "7a394543-62fd-4274-a7d2-8fac775942b6"
},
"Account": {
"$type": "System.String",
"$value": "jtseng@vscsi.us"
},
"DN": {
"$type": "System.String",
"$value": ""
},
"Mail": {
"$type": "System.String",
"$value": "jtseng@vscsi.us"
},
"SpecialType": {
"$type": "System.String",
"$value": "Generic"
},
"Alias": {
"$type": "System.String",
"$value": "jtseng"
},
"PUID": {
"$type": "System.String",
"$value": "aad:100FAFF21C1B5261"
},
"ComplianceValidated": {
"$type": "System.DateTime",
"$value": "2020-04-23T00:00:00Z"
},
"http://schemas.microsoft.com/identity/claims/objectidentifier": {
"$type": "System.String",
"$value": "55c8c7b6-7ace-43bc-918f-304dfa2b6317"
},
"MetadataUpdateDate": {
"$type": "System.DateTime",
"$value": "2018-07-10T16:11:40Z"
},
"DirectoryAlias": {
"$type": "System.String",
"$value": "jtseng"
}
},
"resourceVersion": 2,
"metaTypeId": 0
},
{
"id": "7c86b535-818b-423f-b0fd-19a2e9f32710",
"descriptor": "Microsoft.TeamFoundation.Identity;S-1-9-1551374245-1725938060-2279921994-2555521242-2616350130-0-0-0-0-3",
"subjectDescriptor": "vssgp.Uy0xLTktMTU1MTM3NDI0NS0xNzI1OTM4MDYwLTIyNzk5MjE5OTQtMjU1NTUyMTI0Mi0yNjE2MzUwMTMwLTAtMC0wLTAtMw",
"providerDisplayName": "[jtseng]\\Project Collection Valid Users",
"isActive": true,
"isContainer": true,
"members": [],
"memberOf": [],
"memberIds": [],
"properties": {
"SchemaClassName": {
"$type": "System.String",
"$value": "Group"
},
"Description": {
"$type": "System.String",
"$value": "This application group contains all users and groups that have access to the Team Project Collection."
},
"Domain": {
"$type": "System.String",
"$value": "vstfs:///Framework/IdentityDomain/8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"Account": {
"$type": "System.String",
"$value": "Project Collection Valid Users"
},
"SecurityGroup": {
"$type": "System.String",
"$value": "SecurityGroup"
},
"SpecialType": {
"$type": "System.String",
"$value": "EveryoneApplicationGroup"
},
"ScopeId": {
"$type": "System.Guid",
"$value": "8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"ScopeType": {
"$type": "System.String",
"$value": "ServiceHost"
},
"LocalScopeId": {
"$type": "System.Guid",
"$value": "8cb9df66-e487-4ad9-9852-28da9bf255b2"
},
"SecuringHostId": {
"$type": "System.Guid",
"$value": "e26baa74-481c-42bc-a78c-f2a89decc807"
},
"ScopeName": {
"$type": "System.String",
"$value": "jtseng"
},
"GlobalScope": {
"$type": "System.String",
"$value": "GlobalScope"
},
"VirtualPlugin": {
"$type": "System.String",
"$value": ""
}
},
"resourceVersion": 2,
"metaTypeId": 255
}
]
}
Définitions
Nom | Description |
---|---|
Identity | |
Identity |
Un descripteur d’identité est un wrapper pour le type d’identité (Windows SID, Passport) ainsi qu’un identificateur unique tel que le SID ou PUID. |
Properties |
La classe représente un conteneur de propriétés sous la forme d’une collection de paires clé-valeur. Les valeurs de tous les types primitifs (tout type avec un |
Query |
Identity
Nom | Type | Description |
---|---|---|
customDisplayName |
string |
Nom complet personnalisé de l’identité (le cas échéant). Si vous affectez à cette propriété une chaîne vide, le nom d’affichage personnalisé existant est effacé. L’attribution de la valeur null à cette propriété n’affecte pas la valeur persistante existante (car les valeurs Null ne sont pas envoyées sur le réseau ou à la base de données) |
descriptor |
Un descripteur d’identité est un wrapper pour le type d’identité (Windows SID, Passport) ainsi qu’un identificateur unique tel que le SID ou PUID. |
|
id |
string |
Identificateur d’identité. Également appelée clé de stockage, ou VSID |
isActive |
boolean |
True si l’identité est membre d’un groupe Azure Devops dans le organization. |
isContainer |
boolean |
True si l’identité est un groupe. |
masterId |
string |
|
memberIds |
string[] |
ID des membres de l’identité (groupes uniquement). |
memberOf |
Un descripteur d’identité est un wrapper pour le type d’identité (Windows SID, Passport) ainsi qu’un identificateur unique tel que le SID ou PUID. |
|
members |
Un descripteur d’identité est un wrapper pour le type d’identité (Windows SID, Passport) ainsi qu’un identificateur unique tel que le SID ou PUID. |
|
metaTypeId |
integer |
|
properties |
La classe représente un conteneur de propriétés sous la forme d’une collection de paires clé-valeur. Les valeurs de tous les types primitifs (tout type avec un |
|
providerDisplayName |
string |
Nom complet de l’identité, tel que spécifié par le fournisseur d’identité source. |
resourceVersion |
integer |
|
socialDescriptor |
string |
|
subjectDescriptor |
string |
Descripteur d’objet d’une entité Graph. |
uniqueUserId |
integer |
IdentityDescriptor
Un descripteur d’identité est un wrapper pour le type d’identité (Windows SID, Passport) ainsi qu’un identificateur unique tel que le SID ou PUID.
Nom | Type | Description |
---|---|---|
identifier |
string |
Identificateur unique de cette identité, ne dépassant pas 256 caractères, qui sera conservé. |
identityType |
string |
Type de descripteur (par exemple, Windows, Passport, etc.). |
PropertiesCollection
La classe représente un conteneur de propriétés sous la forme d’une collection de paires clé-valeur. Les valeurs de tous les types primitifs (tout type avec un TypeCode != TypeCode.Object
) à l’exception de DBNull
sont acceptées. Les valeurs de type Byte[], Int32, Double, DateType et String conservent leur type. Les autres primitives sont réinsérées sous forme de chaîne. Byte[] attendu sous forme de chaîne encodée en base64.
Nom | Type | Description |
---|---|---|
count |
integer |
Nombre de propriétés dans la collection. |
item |
object |
|
keys |
string[] |
Ensemble de clés dans la collection. |
values |
string[] |
Ensemble de valeurs dans la collection. |
QueryMembership
Nom | Type | Description |
---|---|---|
direct |
string |
La requête retourne uniquement les données d’appartenance directe |
expanded |
string |
La requête retourne les données d’appartenance étendues |
expandedDown |
string |
La requête retourne les données d’appartenance étendues vers le bas (enfants uniquement) |
expandedUp |
string |
La requête retourne les données d’appartenance développées (parents uniquement) |
none |
string |
La requête ne retourne aucune donnée d’appartenance |