如何获取 azure 资源的 resouceID

how to fetch resouceID of azure resource

能否请您帮忙在 azure 中获取 resourceid 以调用下面的 restapi

$URL = "https://graph.microsoft.com/beta/privilegedAccess/azureResources/resources/****xxxxxxxxxxxx****/roleDefinitions?$filter=displayName eq 'Contributors'"

$Result = Invoke-RestMethod -Uri $URL -Headers $Headers -Method Get

您可以通过请求list获得您需要的resource id

> GET https://graph.microsoft.com/beta/privilegedAccess/azureResources/resources

请检查:here