问题描述
我们当前正在使用通过以下Microsoft Graph API查询客户帐户上的所有设备来处理Intune设备的客户端应用程序:
获取https://graph.microsoft.com/v1.0/deviceManagement/managedDevices
从测试环境迁移到生产帐户后,我们发现根据相关的Microsoft Graph API OData documentation,使用$skip
和$top
进行设备的手动分页不起作用。 / p>
根据上述文档:
但是,尽管已注册了数千个设备,但以下查询仍返回空结果 在目标客户帐户上:
获取https://graph.microsoft.com/v1.0/deviceManagement/managedDevices?$top=10&$skip=10
{
"@odata.context": "https://graph.microsoft.com/v1.0/$Metadata#deviceManagement/managedDevices","@odata.count": 10,"@odata.nextLink": "https://graph.microsoft.com/v1.0/deviceManagement/managedDevices?$top=10&$skip=10","value": []
}
此外,我们发现OData $filter
也不起作用,如以下片段所示,该片段查询operatingSystem
等于'Android'的设备:
获取'https://graph.microsoft.com/v1.0/deviceManagement/managedDevices?$top=100&filter=operatingSystem%20eq%20%27Android%27'
{
"@odata.context": "https://graph.microsoft.com/v1.0/$Metadata#deviceManagement/managedDevices","@odata.count": 100,"@odata.nextLink": "https://graph.microsoft.com/v1.0/deviceManagement/managedDevices?$top=100&$skip=0&filter=operatingSystem+eq+%27Android%27","value": [
{
"id": "5bac965e-25e3-4f99-97fb-da21a280f684","userId": "some-uuid-value","deviceName": "My Iphone","managedDeviceOwnerType": "company","enrolledDateTime": "2020-02-05T09:52:39Z","lastSyncDateTime": "2020-10-19T17:07:20Z","operatingSystem": "iOS",...
我们已使用上述API的v1.0
和beta
版本进行了测试,但无济于事。有人有这个工作吗?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)