Skip to content

Device Categories Blank #381

@AshForde

Description

@AshForde

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"
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions