组: checkMemberObjectsgroup: checkMemberObjects

重要

Microsoft Graph 中/beta的版本下的 api 可能会发生更改。APIs under the /beta version in Microsoft Graph are subject to change. 不支持在生产应用程序中使用这些 API。Use of these APIs in production applications is not supported.

检查指定组的组列表或管理单元的成员资格。Check for membership in a list of groups or administrative units for the specified group. 此方法是可传递的。This method is transitive.

权限Permissions

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.

权限类型Permission type 权限(从最低特权到最高特权)Permissions (from least to most privileged)
委派(工作或学校帐户)Delegated (work or school account) Group.Read.All、Group.ReadWrite.AllGroup.Read.All, Group.ReadWrite.All
And:
  • 如果检查管理单元的成员身份: AdministrativeUnit、AdministrativeUnitIf checking for membership in administrative units: AdministrativeUnit.Read.All, AdministrativeUnit.ReadWrite.All

Directory.Read.All、Directory.ReadWrite.All、Directory.AccessAsUser.AllDirectory.Read.All, Directory.ReadWrite.All, Directory.AccessAsUser.All
委派(个人 Microsoft 帐户)Delegated (personal Microsoft account) 不支持。Not supported.
应用程序Application Group.Read.All、Group.ReadWrite.AllGroup.Read.All, Group.ReadWrite.All
And:
  • 如果检查管理单元的成员身份: AdministrativeUnit、AdministrativeUnitIf checking for membership in administrative units: AdministrativeUnit.Read.All, AdministrativeUnit.ReadWrite.All

Directory.Read.All、Directory.ReadWrite.AllDirectory.Read.All, Directory.ReadWrite.All

HTTP 请求HTTP request

POST /groups/{id}/checkMemberObjects

请求标头Request headers

名称Name 说明Description
AuthorizationAuthorization 持有者 {token}Bearer {token}
Content-TypeContent-Type application/jsonapplication/json

请求正文Request body

在请求正文中,提供具有以下参数的 JSON 对象。In the request body, provide a JSON object with the following parameters.

参数Parameter 类型Type 说明Description
idsids String collectionString collection 包含目录角色的组、目录角色、管理单元或 roleTemplate Id 的对象 Id 的集合,用于检查成员身份。A collection that contains the object IDs of the groups, directory roles, administrative units, or roleTemplate IDs of directory roles, in which to check membership. 最高可指定20个对象。Up to 20 objects may be specified.

响应Response

如果成功,此方法在响应200 OK正文中返回响应代码和字符串集合对象。If successful, this method returns a 200 OK response code and a String collection object in the response body.

示例Examples

以下示例演示如何调用此 API。The following example shows how to call this API.

请求Request

下面展示了示例请求。The following is an example of the request.

POST https://graph.microsoft.com/beta/groups/{id}/checkMemberObjects
Content-type: application/json

{
  "ids": [
    "80a963dd-84af-4eb8-b2a6-781e444d4fb0",
    "62e90394-69f5-4237-9190-012177145e10",
    "86a64f51-3a64-4cc6-a8c8-6b8f000c0f52",
    "ac38546e-ddf3-437a-ac5c-27a94cd7a0f1"
  ]
}

响应Response

下面展示了示例响应。The following is an example of the response.

注意: 为了提高可读性,可能缩短了此处显示的响应对象。所有属性都将通过实际调用返回。Note: The response object shown here might be shortened for readability. All the properties will be returned from an actual call.

HTTP/1.1 200 OK
Content-type: application/json

{
  "value": [
    "80a963dd-84af-4eb8-b2a6-781e444d4fb0", 
    "62e90394-69f5-4237-9190-012177145e10"
  ]
}