列出 resourceActions

命名空间:microsoft.graph

重要

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

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

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

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

权限

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

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

HTTP 请求

GET /roleManagement/directory/resourceNamespaces/{unifiedRbacResourceNamespaceId}/resourceActions

可选的查询参数

此方法支持 $filter$select$top$skipToken OData 查询参数来帮助自定义响应。 此方法支持 $filteractionVerbdescriptionidisPrivilegedname 属性的 (eq) 。 此方法返回 100 个 resourceActions 的默认页面大小,并支持 $top$skipToken 用于分页。 若要了解一般信息,请参阅 OData 查询参数

请求标头

名称 说明
Authorization 持有者 {token}。 必填。 详细了解 身份验证和授权

请求正文

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

响应

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

示例

示例 1:列出 microsoft.directory 操作

以下示例列出标识符 microsoft.directory为 的资源命名空间的操作。

此方法最多返回 100 个操作。 如果有更多操作,可以使用 @odata.nextLink 获取下一组操作。 若要检索更大的操作集,请使用 $top 参数。

请求

GET https://graph.microsoft.com/beta/roleManagement/directory/resourceNamespaces/microsoft.directory/resourceActions

响应

注意: 为了可读性,此处显示的答复对象已缩短。

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#roleManagement/directory/resourceNamespaces('microsoft.directory')/resourceActions",
    "@odata.nextLink": "https://graph.microsoft.com/beta/roleManagement/directory/resourceNamespaces/microsoft.directory/resourceActions?$skiptoken=bWljcm9z...",
    "value": [
        {
            "actionVerb": null,
            "description": "Create and delete access reviews, and read and update all properties of access reviews in Azure AD",
            "id": "microsoft.directory-accessReviews-allProperties-allTasks",
            "isPrivileged": false,
            "name": "microsoft.directory/accessReviews/allProperties/allTasks",
            "resourceScopeId": null
        },
        {
            "actionVerb": "GET",
            "description": "Read all properties of access reviews",
            "id": "microsoft.directory-accessReviews-allProperties-read-get",
            "isPrivileged": false,
            "name": "microsoft.directory/accessReviews/allProperties/read",
            "resourceScopeId": null
        },
        {
            "actionVerb": null,
            "description": "Manage access reviews of application role assignments in Azure AD",
            "id": "microsoft.directory-accessReviews-definitions.applications-allProperties-allTasks",
            "isPrivileged": false,
            "name": "microsoft.directory/accessReviews/definitions.applications/allProperties/allTasks",
            "resourceScopeId": null
        }
    ]
}

示例 2:列出 microsoft.insights 操作

以下示例列出标识符 microsoft.insights为 的资源命名空间的操作。

请求

GET https://graph.microsoft.com/beta/roleManagement/directory/resourceNamespaces/microsoft.insights/resourceActions

响应

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#roleManagement/directory/resourceNamespaces('microsoft.insights')/resourceActions",
    "value": [
        {
            "actionVerb": null,
            "description": "Manage all aspects of Insights app",
            "id": "microsoft.insights-allEntities-allProperties-allTasks",
            "isPrivileged": false,
            "name": "microsoft.insights/allEntities/allProperties/allTasks",
            "resourceScopeId": null
        },
        {
            "actionVerb": null,
            "description": "Read all aspects of Viva Insights",
            "id": "microsoft.insights-allEntities-allProperties-read",
            "isPrivileged": false,
            "name": "microsoft.insights/allEntities/allProperties/read",
            "resourceScopeId": null
        },
        {
            "actionVerb": "PATCH",
            "description": "Deploy and manage programs in Insights app",
            "id": "microsoft.insights-programs-allProperties-update-patch",
            "isPrivileged": false,
            "name": "microsoft.insights/programs/allProperties/update",
            "resourceScopeId": null
        },
        {
            "actionVerb": null,
            "description": "Run and manage queries in Viva Insights",
            "id": "microsoft.insights-queries-allProperties-allTasks",
            "isPrivileged": false,
            "name": "microsoft.insights/queries/allProperties/allTasks",
            "resourceScopeId": null
        },
        {
            "actionVerb": "GET",
            "description": "View reports and dashboard in Insights app",
            "id": "microsoft.insights-reports-allProperties-read-get",
            "isPrivileged": false,
            "name": "microsoft.insights/reports/allProperties/read",
            "resourceScopeId": null
        }
    ]
}

示例 3:列出特权操作

以下示例列出资源命名空间的特权操作,标识符 microsoft.directory为 。

此方法最多返回 100 个操作。 如果有更多操作,可以使用 @odata.nextLink 获取下一组操作。 若要检索更大的操作集,请使用 $top 参数。

请求

以下示例显示了一个请求。

GET https://graph.microsoft.com/beta/roleManagement/directory/resourceNamespaces/microsoft.directory/resourceActions?$filter=isPrivileged eq true

响应

以下示例显示了相应的响应。

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

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

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#roleManagement/directory/resourceNamespaces('microsoft.directory')/resourceActions",
    "value": [
        {
            "actionVerb": "PATCH",
            "description": "Update application credentials",
            "id": "microsoft.directory-applications-credentials-update-patch",
            "isPrivileged": true,
            "name": "microsoft.directory/applications/credentials/update",
            "resourceScopeId": null
        },
        {
            "actionVerb": null,
            "description": "Manage all aspects of authorization policy",
            "id": "microsoft.directory-authorizationPolicy-allProperties-allTasks",
            "isPrivileged": true,
            "name": "microsoft.directory/authorizationPolicy/allProperties/allTasks",
            "resourceScopeId": null
        }
    ]
}