列表治理资源
命名空间:microsoft.graph
重要
Microsoft Graph /beta
版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
警告
面向 Azure 资源的此版本特权标识管理 (PIM) API 即将弃用。 请使用新的 面向 Azure 资源角色的 Azure REST PIM API。
检索请求者有权访问的 governanceResource 集合。
此 API 可用于以下国家级云部署。
全局服务 | 美国政府 L4 | 美国政府 L5 (DOD) | 由世纪互联运营的中国 |
---|---|---|---|
✅ | ✅ | ✅ | ❌ |
权限
下表显示了对每种受支持的资源类型调用此 API 所需的最低特权权限。 请遵循 最佳做法 来请求最低特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考。
支持的资源 | 委派(工作或学校帐户) | 委派(个人 Microsoft 帐户) | 应用程序 |
---|---|---|---|
Microsoft Entra ID | PrivilegedAccess.ReadWrite.AzureAD | 不支持。 | PrivilegedAccess.Read.AzureAD |
Azure 资源 | PrivilegedAccess.ReadWrite.AzureResources | 不支持。 | PrivilegedAccess.Read.AzureResources |
组 | PrivilegedAccess.ReadWrite.AzureADGroup | 不支持。 | PrivilegedAccess.Read.AzureADGroup |
HTTP 请求
GET /privilegedAccess/azureResources/resources
可选的查询参数
此方法支持使用 OData 查询参数来帮助自定义响应。
请求标头
名称 | 说明 |
---|---|
Authorization | Bearer {code} |
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法在 200 OK
响应正文中返回响应代码和 governanceResource 对象的集合。
示例
此示例列出了我当前可以访问的所有资源。
请求
GET https://graph.microsoft.com/beta/privilegedAccess/azureResources/resources
响应
以下示例显示了相应的响应。
注意:为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-type: application/json
Content-Length: 1289
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#governanceResources",
"value":[
{
"id": "fb016e3a-c3ed-4d9d-96b6-a54cd4f0b735",
"externalId": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d/resourceGroups/AnujRG/providers/Microsoft.Storage/storageAccounts/anujstoragefimdev",
"type": "Microsoft.Storage/storageAccounts",
"displayName": "anujstoragefimdev",
"status": "Active",
"registeredDateTime": "2018-04-05T22:30:37.13Z",
"registeredRoot": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d",
},
{
"id": "0e0e4461-0c46-4d13-bf69-7cacbec75471",
"externalId": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d/resourceGroups/ARPJ-TESTRG-01/providers/Microsoft.Compute/virtualMachines/APRJ-VM-01-T",
"type": "Microsoft.Compute/virtualMachines",
"displayName": "APRJ-VM-01-T",
"status": "Active",
"registeredDateTime": "2018-04-05T22:30:37.13Z",
"registeredRoot": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d",
},
{
"id": "c072eb85-e47b-4627-81cb-5af82a8fc9fb",
"externalId": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d/resourceGroups/ARPJ-TESTRG-01/providers/Microsoft.Compute/virtualMachines/APRJ-VM-01-T/extensions/IaaSAntimalware",
"type": "Microsoft.Compute/virtualMachines/extensions",
"displayName": "APRJ-VM-01-T/IaaSAntimalware",
"status": "Active",
"registeredDateTime": "2018-04-05T22:30:37.13Z",
"registeredRoot": "/subscriptions/38ab2ccc-3747-4567-b36b-9478f5602f0d",
}
]
}
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈