在哪里可以从Microsoft Powershell样本中找到API的许可
我正在尝试创建一个基本上使用 powershell intune 示例中的 Win32_Application_Add.ps1 的应用程序。 该应用程序具有以下权限:
- DeviceManagementApps.Read.All
- DeviceManagementApps.ReadWrite.All
All 与多个 api 调用配合良好,直到它达到 第1052行,我收到错误消息 响应状态代码并不表示成功:401(未经授权)。
我预计该应用程序拥有所需的所有访问权限并会继续
它调用的 uri 为:
/deviceAppManagement/mobileApps/{mobileAppId}/microsoft.graph.win32LobApp/contentVersions/1/files/{fileId}
如果我与管理员用户一起使用 microsoft graph explorer,它返回有效结果
问题:
需要什么权限以及如何找到此调用的记录 /deviceAppManagement/mobileApps/{mobileAppId}/microsoft.graph.win32LobApp/contentVersions/1/files/{fileId}
我尝试了什么:
我检查了图形资源管理器中的功能这将向您显示需要什么权限,但它会导致图形资源管理器崩溃。(功能处于预览状态)
尝试为应用程序提供所有 intune 权限范围,但这效果为零
谷歌搜索电话还没有给我任何有用的东西
I am trying to create a app that basically uses Win32_Application_Add.ps1 from the powershell intune samples.
The application has the following permissions:
- DeviceManagementApps.Read.All
- DeviceManagementApps.ReadWrite.All
All goes well with multiple api calls until it hits line 1052 and i get error sayingResponse status code does not indicate success: 401 (Unauthorized).
I expected the app had all access it needed and would continue
The uri it calls is:
/deviceAppManagement/mobileApps/{mobileAppId}/microsoft.graph.win32LobApp/contentVersions/1/files/{fileId}
If i use the microsoft graph explorer with my admin user it returns a valid result
question:
What permission is needed and how do i find that documented for this call/deviceAppManagement/mobileApps/{mobileAppId}/microsoft.graph.win32LobApp/contentVersions/1/files/{fileId}
what have i tried:
I checked the function in graph explorer that will show you what permission that is needed , but it crashes the graph explorer.(function is in preview)
Tried to give the app all the intune permission scopes, but that had zero effect
Googling the call has not given my anything useful yet
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要检查Intune的委派和申请权限,请参阅此文档, intune设备管理权限。
To check both delegated and application permissions for the Intune please refer this document, Intune device management permissions.