Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Sumanjit092 opened this issue May 30, 2024 · 4 comments

Comments

@Sumanjit092
Copy link

Sumanjit092 commented May 30, 2024

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 Sumanjit092 added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels May 30, 2024
@petrhollayms
Copy link

Hi @Sumanjit092 ,

Could you please try to reproduce the issue in Graph Explorer - do you also get 500 there or do you get the data?
Can you call the endpoint using the Invoke-MgGraphRequest and see if you get the same result?
We're trying to understand to which extent is the issue caused by the data in your tenant, for us to see how to reproduce it.

Also, could you please try using the -Debug parameter when executing the cmdlets and share the output?
Error handling and troubleshooting cmdlets | Microsoft Learn

Last question- was it working before or is it the 1st time you are trying to get the data here?

@petrhollayms petrhollayms added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed status:waiting-for-triage An issue that is yet to be reviewed or assigned labels Jun 3, 2024
@Sumanjit092
Copy link
Author

Graph Explorer

Screenshot 2024-06-03 154534

Debug

Screenshot 2024-06-03 164200 Screenshot 2024-06-03 164228 Screenshot 2024-06-03 164253

Invoke-MgGraphRequest

image

When I extract value, I saw iOS devices in the result. Where, I have used filter only for Windows and MacOS devices

Answer:

I am using this for first time. Earlier, I was using command "Get-IntuneManagedDevice" command. If I run command as Get-MgDeviceManagementManagedDevice -All -Filter "OperatingSystem eq 'Windows' and Manufacturer eq 'HP'", it gives me intended output.

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Jun 3, 2024
@timayabi2020
Copy link
Contributor

@Sumanjit092 thank you for logging this issue and from the screenshots you've shared (tried both on Graph explorer and the SDK itself), it seems this is an API related issue.
Unfortunately for API related issues/questions we are not best placed to give an answer. Kindly raise an issue here https://developer.microsoft.com/en-us/graph/support so that the API owner can respond to it.

@timayabi2020 timayabi2020 added Service issue status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close and removed Needs: Attention 👋 type:bug A broken experience labels Jun 25, 2024
@Sumanjit092
Copy link
Author

Sumanjit092 commented Jun 30, 2024

I've already raised a support case. Had a several call with Microsoft Engineer and problem is not solved. TrackingID#2406030030006338

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs: Attention 👋 and removed status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close labels Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants