简体   繁体   English

如何调用 PIM Graph API 端点?

[英]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 上有一个未解决的问题,但作者/所有者明显缺席

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.

相关问题 是否可以使用 Azure Graph API 来更改 PIM 中的通知 - Is it possible to use Azure Graph API to change Notifications in PIM 3 图表 API 端点 - 匹配后从一列插入到另一列 - 3 Graph API Endpoints - inserting column from one to another after matching 如何使用powshell调用Graph API,例如获取用户数据? - How to use the powshell to call the Graph API, such as get the user's data? 如何通过使用计时器触发器和 Z3D265B4EFA01EEEF0DCCZB88 调用 azure function 中的调用图 api - How to call call graph api in the azure function by using timer trigger and PowerShell 如何通过PowerShell对AAD进行身份验证并将Graph API称为Native Client应用程序? - How can I authenticate to AAD and call the Graph API as a Native Client application with PowerShell? 无法使用 PowerShell 中的委派权限调用图 API - Cannot call Graph API using delegated permissions in PowerShell Microsoft Graph API | 如何从Powershell Graph API获取threadID? - Microsoft Graph API | How to get threadID from Powershell Graph API? 使用Powershell调用Graph Api上传文件夹和文件 - Using Powershell to call the Graph Api to upload Folders and Files 如何使用图形 api 访问 sharepoint 文件夹 - how to access sharepoint folder using graph api Azure PIM PowerShell 脚本 - Azure PIM PowerShell Script
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM