[英]How to call the PIM Graph API endpoints?
I am trying to call the PIM (Privileged Identity Management) REST endpoints via the Graph API using PowerShell. In Graph Explorer I try https://graph.microsoft.com/beta/policies/roleManagementPolicies
but it returns "{\"errorCode\":\"MissingProvider\",\"message\":\"The provider is missing.\",\"instanceAnnotations\":[]}"
我正在尝试使用 PowerShell 通过 Graph API 调用 PIM(特权身份管理)REST 端点。在 Graph Explorer 中,我尝试
https://graph.microsoft.com/beta/policies/roleManagementPolicies
但它返回"{\"errorCode\":\"MissingProvider\",\"message\":\"The provider is missing.\",\"instanceAnnotations\":[]}"
I have gone down a rabbit hole with the MS documentation on this.我在 MS 文档中陷入了困境。 Closest I got was they suggested the Powershell SDK, which is the new Microsoft.graph module.
我最接近的是他们建议使用 Powershell SDK,这是新的 Microsoft.graph 模块。 The equivalent cmdlet is
Get-MgPolicyRoleManagementPolicy
which returns a similar error {"errorCode":"MissingProvider","message":"The provider is missing.","instanceAnnotations":[]}
.等效的 cmdlet 是
Get-MgPolicyRoleManagementPolicy
,它返回类似的错误{"errorCode":"MissingProvider","message":"The provider is missing.","instanceAnnotations":[]}
。 I can't find anywhere how to supply it the missing information.我无法在任何地方找到如何向它提供缺失的信息。 I know this is beta and pretty bleeding edge, but I'm hoping someone has been down this and found a solution.
我知道这是测试版并且非常前沿,但我希望有人已经解决了这个问题并找到了解决方案。 There's an outstanding issue on GitHub for this, but the author/owner is conspicuously absent
GitHub 上有一个未解决的问题,但作者/所有者明显缺席
This is know issue - https://github.com/microsoftgraph/microsoft-graph-docs/issues/15910?msclkid=c0822b1ca5cf11ec93ebea64a421b423这是已知问题 - https://github.com/microsoftgraph/microsoft-graph-docs/issues/15910?msclkid=c0822b1ca5cf11ec93ebea64a421b423
we will try to escalate this with dev team我们将尝试与开发团队一起升级
The below query will help fix the issue.以下查询将有助于解决问题。
https://graph.microsoft.com/beta/policies/roleManagementPolicies?$filter=scopeId+eq+'/'+and+scopeType+eq+'DirectoryRole' https://graph.microsoft.com/beta/policies/roleManagementPolicies?$filter=scopeId+eq+'/'+and+scopeType+eq+'DirectoryRole'
The scopeId and scopeType are required in the URL, will raise a PR to fix the docs. URL 中需要 scopeId 和 scopeType,将提出 PR 来修复文档。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.