列表定义

命名空间:microsoft.graph

重要

Microsoft Graph /beta 版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。

检索 accessReviewScheduleDefinition 对象。 为创建的每个访问评审系列返回零个或多个 accessReviewScheduleDefinition 对象的列表,包括其所有嵌套属性。 这不包括关联的 accessReviewInstance 对象。

此 API 可用于以下国家级云部署

全局服务 美国政府 L4 美国政府 L5 (DOD) 由世纪互联运营的中国

权限

为此 API 选择标记为最低特权的权限。 只有在应用需要它时,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考

权限类型 最低特权权限 更高特权权限
委派(工作或学校帐户) AccessReview.Read.All AccessReview.ReadWrite.All
委派(个人 Microsoft 帐户) 不支持。 不支持。
应用程序 AccessReview.Read.All AccessReview.ReadWrite.All

对于委托方案,已登录用户必须至少具有以下Microsoft Entra角色之一。

读取组或应用的访问评审 读取Microsoft Entra角色的访问评审
访问评审计划定义的创建者
全局读取者
安全读取者
用户管理员
标识治理管理员
安全管理员
安全信息读取者
标识治理管理员
特权角色管理员
安全管理员

HTTP 请求

列出所有 accessReviewScheduleDefinitions:

GET /identityGovernance/accessReviews/definitions

可选的查询参数

此方法支持 $select$top$skip$filter OData 查询参数来帮助自定义响应。 若要了解一般信息,请参阅 OData 查询参数

此 API 的默认页面大小为 100 个 accessReviewScheduleDefinition 对象。 若要提高效率并避免由于大型结果集而超时,请使用 $skip$top 查询参数应用分页。 有关详细信息,请参阅在应用中对 Microsoft Graph 数据进行分页

使用 $filter 查询参数

$filteraccessReviewScheduleDefinitionscope 属性支持使用 contains 运算符的查询参数。 对请求使用以下格式:

/identityGovernance/accessReviews/definitions?$filter=contains(scope/microsoft.graph.accessReviewQueryScope/query, '{object}')

可以 {object} 具有以下值之一:

说明
/groups 列出单个组的每个 accessReviewScheduleDefinition (不包括作用域为来宾) 的所有 Microsoft 365 组的定义。
/groups/{group id} 列出特定组的每个 accessReviewScheduleDefinition (不包括限定为来宾) 的所有 Microsoft 365 组的定义。
./members 列出每个 accessReviewScheduleDefinition 作用域为包含来宾的所有 Microsoft 365 组。
accessPackageAssignments 列出访问包上的每个 accessReviewScheduleDefinition。
roleAssignmentScheduleInstances 列出分配给特权角色的主体的每个 accessReviewScheduleDefinition。

$filteraccessReviewInactiveUserQueryScopeprincipalResourceMembershipScope 不支持查询参数。

请求标头

无。

请求正文

不要提供请求正文。

响应

如果成功,此方法在响应正文中返回响应 200 OK 代码和 accessReviewScheduleDefinition 对象数组。

示例

示例 1:列出前一百个访问评审定义

请求

GET https://graph.microsoft.com/beta/identityGovernance/accessReviews/definitions?$top=100&$skip=0

响应

注意:为了提高可读性,可能缩短了此处显示的响应对象。

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/accessReviews/definitions",
    "@odata.count": 1,
    "value": [
        {
            "id": "98dcebed-c7f6-46f4-bcf3-4a3fccdb3e2a",
            "displayName": "Access Review",
            "scope": {
                "@odata.type": "#microsoft.graph.accessReviewQueryScope",
                "query": "/groups/119cc181-22f0-4e18-8537-264e7524ee0b/transitiveMembers",
                "queryType": "MicrosoftGraph"
            },
            "instanceEnumerationScope": {
                "@odata.type": "#microsoft.graph.accessReviewQueryScope",
                "query": "/groups/119cc181-22f0-4e18-8537-264e7524ee0b",
                "queryType": "MicrosoftGraph"
            },
            "reviewers": [
                {
                    "query": "./manager",
                    "queryType": "MicrosoftGraph",
                    "queryRoot": "decisions"
                }
            ],
            "settings": {
                "mailNotificationsEnabled": true,
                "reminderNotificationsEnabled": true,
                "justificationRequiredOnApproval": true,
                "defaultDecisionEnabled": false,
                "defaultDecision": "None",
                "instanceDurationInDays": 0,
                "autoApplyDecisionsEnabled": false,
                "recommendationsEnabled": true,
                "recurrence": {
                    "pattern": {
                        "type": "weekly",
                        "interval": 1,
                        "month": 0,
                        "dayOfMonth": 0,
                        "daysOfWeek": [],
                        "firstDayOfWeek": "sunday",
                        "index": "first"
                    },
                    "range": {
                        "type": "numbered",
                        "numberOfOccurrences": 0,
                        "recurrenceTimeZone": null,
                        "startDate": "2020-09-11",
                        "endDate": "9999-12-31"
                    }
                }
            }
        }
    ]
}

示例 2:检索范围限定为租户中所有 Microsoft 365 组的所有访问评审定义

请求

以下示例显示了检索范围限定为租户中所有 Microsoft 365 组的所有访问评审系列的请求。

GET https://graph.microsoft.com/beta/identityGovernance/accessReviews/definitions?$filter=contains(scope/microsoft.graph.accessReviewQueryScope/query, './members')

响应

注意:为了提高可读性,可能缩短了此处显示的响应对象。

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#identityGovernance/accessReviews/definitions",
    "@odata.count": 1,
    "value": [
        {
            "id": "cc701697-762c-439a-81f5-f58d680fde76",
            "displayName": "Review guest access across Microsoft 365 groups",
            "status": "InProgress",
            "scope": {
                "@odata.type": "#microsoft.graph.accessReviewQueryScope",
                "query": "./members/microsoft.graph.user/?$count=true&$filter=(userType eq 'Guest')",
                "queryType": "MicrosoftGraph"
            },
            "instanceEnumerationScope": {
                "@odata.type": "#microsoft.graph.accessReviewQueryScope",
                "query": "/groups?$filter=(groupTypes/any(c:c+eq+'Unified'))&$count=true",
                "queryType": "MicrosoftGraph"
            },
            "reviewers": [
                {
                    "query": "./manager",
                    "queryType": "MicrosoftGraph",
                    "queryRoot": "decisions"
                }
            ],
            "settings": {
                "mailNotificationsEnabled": true,
                "reminderNotificationsEnabled": true,
                "justificationRequiredOnApproval": true,
                "defaultDecisionEnabled": true,
                "defaultDecision": "Recommendation",
                "instanceDurationInDays": 25,
                "autoApplyDecisionsEnabled": true,
                "recommendationsEnabled": true,
                "recurrence": {
                    "pattern": {
                        "type": "absoluteMonthly",
                        "interval": 3,
                        "month": 0,
                        "dayOfMonth": 0,
                        "daysOfWeek": [],
                        "firstDayOfWeek": "sunday",
                        "index": "first"
                    },
                    "range": {
                        "type": "numbered",
                        "numberOfOccurrences": 0,
                        "recurrenceTimeZone": null,
                        "startDate": "2021-04-27",
                        "endDate": "9999-12-31"
                    }
                },
                "applyActions": [
                    {
                        "@odata.type": "#microsoft.graph.removeAccessApplyAction"
                    }
                ]
            },
            "instances": []
        }
    ]
}