microsoftgraph / microsoftgraph/msgraph-beta-sdk-dotnet
ManagedDevices list request: filter by deviceType do not work. And also a wrong deviceType is returned in the response.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 112
- Forks
- 37
- Avg merge
- 14h 57m
- Merged PRs (30d)
- 3
Description
Describe the bug
As mentioned in docs https://learn.microsoft.com/en-us/graph/api/resources/intune-devices-manageddevice?view=graph-rest-beta , ManagedDevice.DeviceType field reflects actual device type and supports filtering.
But it has two problems:
- deviceType field has a wrong value from the LIST request. It shows 'windowsRT' for the cloudPC devices.
- filtering by this field do not work. it return all devices ignoring provided filter.
This bug reproduces on Dotnet SDK and in Graph Explorer.
But it is not reproduced on the Intune portal. It works correct here
Expected behavior
- Correct deviceType should be returned from the list devices request
- Filter by deviceType should work
How to reproduce
My request:
https://graph.microsoft.com/beta/deviceManagement/managedDevices?$select=model,deviceType&$filter=deviceType eq 'cloudPC'
Graph response:
[
{
"model": "",
"deviceType": "unknown" // problem: this device should be filtered out
},
{
"model": "Virtual Machine",
"deviceType": "windowsRT" // problem: this device should be filtered out
},
{
"model": "Cloud PC Frontline 2vCPU/4GB/64GB",
"deviceType": "windowsRT" // wrong: it is cloudPC
},
...
]
SDK Version
6.2.0
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Graph Explorer request for /beta/deviceManagement/managedDevices using $select=model,deviceType and $filter=deviceType eq 'cloudPC', then compare its response with the Intune portal behavior. Check whether the same result occurs through the .NET SDK version 6.2.0. Done means cloudPC devices return deviceType 'cloudPC' and nonmatching devices are excluded by the filter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100