列表定义

命名空间:microsoft.graph

获取 accessReviewScheduleDefinition 对象及其属性的列表。

权限

要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限

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

登录用户还必须具有允许他们读取访问评审的目录角色。 请参阅访问评审 角色和应用程序权限授权检查

HTTP 请求

列出所有 accessReviewScheduleDefinitions:

GET /identityGovernance/accessReviews/definitions

可选的查询参数

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

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

使用$filter查询参数

$filter accessReviewScheduleDefinition 的范围 属性支持具有contains运算符的查询参数。 对请求使用以下格式:

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

其值 {object} 可以是下列值之一:

说明
/groups 列出单个组上的每个 accessReviewScheduleDefinition (排除范围限定到所有 Microsoft 365 组的定义,其中来宾用户) 。
/groups/{group id} 列出特定组上的每个 accessReviewScheduleDefinition (排除范围限定到所有 Microsoft 365 组的定义,并) 来宾用户。
./members 列出范围为具有来宾用户的所有 Microsoft 365 组的每个 accessReviewScheduleDefinition。
accessPackageAssignments 列出访问包上的每个 accessReviewScheduleDefinition。
roleAssignmentScheduleInstances 列出分配给特权角色的服务主体的每个 accessReviewScheduleDefinition。

$filter accessReviewInactiveUserQueryScopeprincipalResourceMembershipScope 不支持查询参数。

请求标头

名称 说明
Authorization Bearer {token}。必需。

请求正文

请勿提供此方法的请求正文。

响应

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

示例

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

请求

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

响应

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

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

{
    "@odata.context": "https://graph.microsoft.com/v1.0/$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/v1.0/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/v1.0/$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": []
        }
    ]
}