Ekinlikler
17 Mar 23 - 21 Mar 23
Diğer geliştiriciler ve uzmanlarla gerçek dünyadaki kullanım örneklerini temel alan ölçeklenebilir yapay zeka çözümleri oluşturmak için toplantı serisine katılın.
Hemen kaydolunBu tarayıcı artık desteklenmiyor.
En son özelliklerden, güvenlik güncelleştirmelerinden ve teknik destekten faydalanmak için Microsoft Edge’e yükseltin.
Namespace: microsoft.graph
Return the directory objects specified in a list of IDs. Only a subset of user properties are returned by default in v1.0.
Some common uses for this function are to:
This API is available in the following national cloud deployments.
Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
---|---|---|---|
✅ | ✅ | ✅ | ✅ |
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type | Least privileged permissions | Higher privileged permissions |
---|---|---|
Delegated (work or school account) | Directory.Read.All | Not available. |
Delegated (personal Microsoft account) | Not supported. | Not supported. |
Application | Directory.Read.All | Not available. |
Önemli
When an application queries a relationship that returns a directoryObject type collection, if it doesn't have permission to read a certain resource type, members of that type are returned but with limited information. For example, only the @odata.type property for the object type and the id is returned, while other properties are indicated as null
. With this behavior, applications can request the least privileged permissions they need, rather than rely on the set of Directory.* permissions. For details, see Limited information returned for inaccessible member objects.
POST /directoryObjects/getByIds
Name | Description |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Content-type | application/json. Required. |
In the request body, provide a JSON object with the following parameters.
Parameter | Type | Description |
---|---|---|
ids | String collection | A collection of IDs for which to return objects. The IDs are GUIDs, represented as strings. You can specify up to 1000 IDs. |
types | String collection | A collection of resource types that specifies the set of resource collections to search. If not specified, the default is directoryObject, which contains all of the resource types defined in the directory. Any object that derives from directoryObject may be specified in the collection; for example: user, group, and device objects. To search for references to a Cloud Solution Provider partner organization specify directoryObjectPartnerReference. If not specified, the default is directoryObject, which contains all of the resource types defined in the directory, except for references to a Cloud Solution Provider partner organization. The values are not case-sensitive. |
If successful, this method returns a 200 OK
response code and a string collection object in the response body.
POST https://graph.microsoft.com/v1.0/directoryObjects/getByIds
Content-type: application/json
{
"ids": [
"84b80893-8749-40a3-97b7-68513b600544",
"5d6059b6-368d-45f8-91e1-8e07d485f1d0",
"0b944de3-e0fc-4774-a49a-b135213725ef",
"b75a5ab2-fe55-4463-bd31-d21ad555c6e0"
],
"types": [
"user",
"group",
"device"
]
}
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#directoryObjects",
"value": [
{
"@odata.type": "#microsoft.graph.user",
"id": "84b80893-8749-40a3-97b7-68513b600544",
"displayName": "Trevor Jones"
},
{
"@odata.type": "#microsoft.graph.user",
"id": "5d6059b6-368d-45f8-91e1-8e07d485f1d0",
"displayName": "Billy Smith"
},
{
"@odata.type": "#microsoft.graph.group",
"id": "0b944de3-e0fc-4774-a49a-b135213725ef",
"description": "Pineview School Staff",
"groupTypes": [
"Unified"
]
},
{
"@odata.type": "#microsoft.graph.device",
"id": "b75a5ab2-fe55-4463-bd31-d21ad555c6e0",
"displayName": "e8ba4e98c000002",
"deviceId": "4c299165-6e8f-4b45-a5ba-c5d250a707ff"
}
]
}
Ekinlikler
17 Mar 23 - 21 Mar 23
Diğer geliştiriciler ve uzmanlarla gerçek dünyadaki kullanım örneklerini temel alan ölçeklenebilir yapay zeka çözümleri oluşturmak için toplantı serisine katılın.
Hemen kaydolun