以非交互方式获取 AzureAD 设备 - 使用 API

Get AzureAD devices non-interactively - using API

我需要从需要 运行 且无需用户交互的后台应用程序中检索 AzureAD 中的所有设备。

到目前为止,我的研究一无所获,Graph API 是获取实际数据的唯一选择 - 但不支持非交互式场景。 :(

问题

是否有way/API以非交互方式获取所有设备?

研究

图表 API:

https://docs.microsoft.com/en-gb/graph/api/intune-devices-manageddevice-get?view=graph-rest-1.0

不支持非交互式场景,如上面来自文档和以下链接的屏幕截图所确认:

https://microsoftintune.uservoice.com/forums/291681-ideas/suggestions/18474520-intune-graph-api-should-be-accessible-non-interact

https://social.technet.microsoft.com/Forums/en-US/1636481c-7101-43d4-9f60-e09cdd65b4b0/noninteractive-access-to-intune-api?forum=microsoftintuneprod

Azure AD 图 API

https://msdn.microsoft.com/Library/Azure/Ad/Graph/api/api-catalog

MS 不推荐 - 而且似乎也没有办法获取设备。

您可以使用以下"GET https://graph.microsoft.com/v1.0/devices"。此调用检索在组织中注册的设备对象列表。

在非交互式场景中也支持此调用。该应用程序将需要以下权限之一。

申请: Device.Read.All、Directory.Read.All

您还可以检查 MS Graph 中设备对象的所有可用操作 here