在哪里可以从Microsoft Powershell样本中找到API的许可

发布于 2025-01-17 21:12:06 字数 1160 浏览 4 评论 0原文

我正在尝试创建一个基本上使用 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 saying
Response 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萤火眠眠 2025-01-24 21:12:06

要检查Intune的委派和申请权限,请参阅此文档, intune设备管理权限

To check both delegated and application permissions for the Intune please refer this document, Intune device management permissions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文