IntuneManagement icon indicating copy to clipboard operation
IntuneManagement copied to clipboard

add "Load option" to the main settings into "MS Graph General" section

Open Mykhailo-Roit opened this issue 10 months ago • 4 comments

Please add "Load option" with values:

  • 20 (default)
  • 100 (max)
  • All (to load All) image

It looks like it should be located in "MS Graph General" section image

Mykhailo-Roit avatar Jan 10 '25 18:01 Mykhailo-Roit

without "Load All" now I have an issue https://github.com/Micke-K/IntuneManagement/issues/299

Mykhailo-Roit avatar Jan 10 '25 18:01 Mykhailo-Roit

draft code:

MSGraph.psm1. function Invoke-InitializeModule

    $script:lstLoadOptions = @(
        [PSCustomObject]@{
            Name = "20"
            Value = "20"
        },
        [PSCustomObject]@{
            Name = "100"
            Value = "100"
        },
        [PSCustomObject]@{
            Name = "All"
            Value = "All"
        }
    )




    Add-SettingsObject (New-Object PSObject -Property @{
        Title = "Load options"
        Key = "LoadOptions"
        Type = "List"
        ItemsSource = $script:lstLoadOptions
        DefaultValue = "20"
        Description = "How many items load at a time"
    }) "GraphGeneral"

possible next steps:

  • save this value in the config file
  • adopt load data function

Mykhailo-Roit avatar Jan 10 '25 18:01 Mykhailo-Roit

prepared PR https://github.com/Micke-K/IntuneManagement/pull/301

Mykhailo-Roit avatar Jan 10 '25 19:01 Mykhailo-Roit

Hello,

This is not exactly that I how would have implemented this. I'll think about it :)

I have implemented this in the Next version. However, that is a complete redesign/rewrite so I can't just port the code back.

Settings Catalog is a pain with paging. The return size does not always match the request eg. I set pages size to 10 and requested all pages. The return values I got was 5,0,2,2. It called it many times even though the page size was larger than the return count. Not sure what that is about though.

Cheers!

Micke-K avatar Jan 12 '25 06:01 Micke-K

Closing this as Load options is added to the script.

Micke-K avatar Sep 14 '25 02:09 Micke-K