-
Notifications
You must be signed in to change notification settings - Fork 342
Description
Hi there,
Great fan of this Tool and frequent user!
The issue I am seeing is when I select Device Categories nothing appears in the app and the console log shows:
Failed to invoke MS Graph with URL [https://graph.microsoft.com/beta/deviceManagement/deviceCategories?$top=500&$expand=assignments]
Status code: BadRequest Exception: Response status code does not indicate success: 400 (Bad Request).
I am starting the console via App Registration and have confirmed I have all the necessary permissions per the documentation - "DeviceManagementConfiguration.ReadWrite.All".
To get around this for now I have applied a patch of sorts to the MSGraph.psm1 so that I can get it going for me but thought I should share in case it has been missed :)
Patch applied to MSGraph.psm1 (Lines 681-686)
{
$url += (?: (($url.IndexOf('?')) -eq -1) "?" "&")
# Only expand assignments unless selecting Device Categories
if ($url -notmatch "/deviceCategories\b") {
$url = "$($url)`$expand=assignments"
}
}