msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Get-MgDeviceManagementManagedDevice -All -Filter "OperatingSystem in ('Windows','MacOs')" returning internal server error.

Open Sumanjit092 opened this issue 1 year ago • 4 comments

Describe the bug

Get-MgDeviceManagementManagedDevice -All -Filter "OperatingSystem in ('Windows','MacOs')" and Get-MgDeviceManagementManagedDevice -All -Filter "Manufacturer in ('HP','Dell Inc.')" is returning below error. It seems to be an issue from Graph API side. In Microsoft Intune GUI, Device filter works well. Not with PowerShell module.

Example -1

Get-MgDeviceManagementManagedDevice_List: { "_version": 3, "Message": "An internal server error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 6d2a95f1-0383-4ded-b1bc-faaa9d41dcaf - Url: https://fef.amsua0502.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices?api-version=2023-10-19&$filter=manufacturer+in+(%27HP%27%2c%27Dell+Inc.%27)", "CustomApiErrorPhrase": "", "RetryAfter": null, "ErrorSourceService": "", "HttpHeaders": "{}" }

Status: 500 (InternalServerError) ErrorCode: InternalServerError Date: 2024-05-30T12:28:26

Headers: Vary : Accept-Encoding Strict-Transport-Security : max-age=31536000 request-id : 1350bd1e-cbd8-4f77-9ff0-45a484c5f2cf client-request-id : 6d2a95f1-0383-4ded-b1bc-faaa9d41dcaf x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Central India","Slice":"E","Ring":"3","ScaleUnit":"001","RoleInstance":"PN3PEPF000002A8"}} Date : Thu, 30 May 2024 12:28:25 GMT

Example 2

Get-MgDeviceManagementManagedDevice_List: { "_version": 3, "Message": "An internal server error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: f7376c98-b937-4646-a867-8a280f9f57d6 - Url: https://fef.amsua0502.manage.microsoft.com/DeviceFE/StatelessDeviceFEService/deviceManagement/managedDevices?api-version=2023-10-19&$filter=operatingSystem+in+(%27Windows%27%2c%27MacOS%27)", "CustomApiErrorPhrase": "", "RetryAfter": null, "ErrorSourceService": "", "HttpHeaders": "{}" }

Status: 500 (InternalServerError) ErrorCode: InternalServerError Date: 2024-05-30T12:27:25

Headers: Vary : Accept-Encoding Strict-Transport-Security : max-age=31536000 request-id : d8ce7af9-4e82-408d-8258-327359178b5e client-request-id : f7376c98-b937-4646-a867-8a280f9f57d6 x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Central India","Slice":"E","Ring":"3","ScaleUnit":"001","RoleInstance":"PN3PEPF00000321"}} Date : Thu, 30 May 2024 12:27:25 GMT

Screenshot 2024-05-30 175756 Screenshot 2024-05-30 175845

Expected behavior

Get-MgDeviceManagementManagedDevice -All -Filter "OperatingSystem in ('Windows','MacOs')" should return all Microsoft Intune enrolled Windows and Mac Devices. Get-MgDeviceManagementManagedDevice -All -Filter "Manufacturer in ('HP','Dell Inc.')" should return all Microsoft Intune enrolled "Dell Inc. and HP" devices.

How to reproduce

Get-MgDeviceManagementManagedDevice -All -Filter "OperatingSystem in ('Windows','MacOs')" or Get-MgDeviceManagementManagedDevice -All -Filter "Manufacturer in ('HP','Dell Inc.')"

SDK Version

2.19.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_

Sumanjit092 avatar May 30 '24 12:05 Sumanjit092