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

Limit of applications #28

Closed
ASMailer opened this issue Sep 24, 2021 · 24 comments
Closed

Limit of applications #28

ASMailer opened this issue Sep 24, 2021 · 24 comments

Comments

@ASMailer
Copy link

ASMailer commented Sep 24, 2021

Hi Micke,

First of all, a really big compliment for the developed tool. The development is really super well implemented. You have really closed the big gap that Microsoft has been leaving behind for several years.

Regarding my topic, when I tried the application category it imports not all our apps, seems it took the first ~1000 apps from the graph API. I assume that a limit is defined, and the graph call is not paging until the end. Would it possible to have this variable? We have really a mass of win32apps in intune (~4500).

A workaround would also helpful, I looked for the used graph call, I have found only in the "DocumentationCustom.psm1" the function Get-CDAllTenantApps with the limit 999, but I´m not sure is this the reason.

Thx
Andi

@ASMailer ASMailer changed the title Applications Limit of applications Sep 24, 2021
@Micke-K
Copy link
Owner

Micke-K commented Sep 24, 2021

Hello Andi,

Thank you for the support and for reporting this. I have been waiting for an issue like this. I know that I need to add paging support in the code so I will look into this.

Graph API has different default based on the API, sometimes 100 and sometimes 1000. I'll add automatic paging to it. However, in a case like this it might be painful since you will get ~4500 items. The data grid can handle it since it uses virtualisation but the scrolling experience will most likely be horrible.

Adding paging is probably going to be the easy part. Making it look good might be way harder. I'll try to implement the paging this weekend or during the week.

Btw...~4500 apps. That is an impressive environment :)

@ASMailer
Copy link
Author

Hey Micke,

Thank you very much for your commitment

Yes, understand, it is precisely in the details that the challenge lies.
With the amount of objects we have to use the filter anyway and restrict the view. Otherwise you won't find anything :-)

If there is anything I can test or help, let me know.

Thx
Andi

@Micke-K
Copy link
Owner

Micke-K commented Sep 30, 2021

Hello!

I've started this but I've been working every night this week. It might take a bit longer than I thought. I am sorry about that!

@Phoenix-DH
Copy link

I started today also using your tool, great one!
I have exactly the same issue ... more than 1000 entries, maybe not only in the apps section.
Having the nextlinks included would be great!
No hurry.

@Micke-K
Copy link
Owner

Micke-K commented Oct 7, 2021

3.2.3 released with a fix for this. ALL items will now be returned. Please report back how the experience is your environments with 4000+ objects. Will it be impossible because it takes too long time or is it "acceptable".

I will most likely keep looking into this to be able to page or load additional pages in the view but return all objects when exporting, documenting etc.

@Phoenix-DH
Copy link

Fo sure it will take longer, but it is working.
Pagination would also be fine if it is quicker, but you need to have all items available to use the filter.

Will try to use it for a preriod of time and give reply.

@ASMailer
Copy link
Author

ASMailer commented Oct 8, 2021

I will most likely keep looking into this to be able to page or load additional pages in the view but return all objects when exporting, documenting etc.

... that would be the most efficient implementation in the end ...

@ASMailer
Copy link
Author

ASMailer commented Oct 8, 2021

... i´m already happy ...:-) works really great. We will continue to work with it and see how it goes.

Thank you very much

@Micke-K
Copy link
Owner

Micke-K commented Mar 3, 2022

Hello!

This was fixed in the December update. You will now get two buttons to either download the next batch or download the rest.

Have you tested it yet?

Cheers!

@Phoenix-DH
Copy link

Hey, not now.... Will do! Thanks.

@Phoenix-DH
Copy link

Hey @Micke-K,

I had a look to the applications. In my case a saw the objects amount of 8614 in the bottom line.
Does that now mean I got all visible?

Was there a change in the meanwhile again, because there are no buttons ;)

@Micke-K
Copy link
Owner

Micke-K commented Mar 7, 2022

Hmmm that is interesting. So the code only calls it once (single page) and should only return a 1000 objects. Not sure if MS has changed this in the background or I have a bug I can't find. I can force my page size to be 10 and that works great. I have a little bit of problem testing 1000 more objects in my environment :)

Can you try updating MSGraph.psm1. Search for #$params.Add("pageSize",10). Remove # and change size to 500. Should now look like:

$params.Add("pageSize",500)

Cheers!

@Phoenix-DH
Copy link

Thats not in the code ... completely not. I only find something with

        elseif($AllPages -eq $true -and $HttpMethod -eq "GET" -and $ret.value -is [Array])
        {
            $allValues += $ret.value
            if($ret.'@odata.nextLink')
            {
                $Url = $ret.'@odata.nextLink'
            }
        }

Seems that you are doing this by default ...

@Micke-K
Copy link
Owner

Micke-K commented Mar 7, 2022

Sorry, I had pageSize at 100 in my original test. It should be at row 489. At least in version 3.4.0.

if($SinglePage -eq $true) { #Use default page size or use below for a specific page size for testing #$params.Add("pageSize",100) }

Cheers!

@Phoenix-DH
Copy link

Oh ... version 3.4?
I used only the download button what might not download 3.4. but 3.2.3

How can I grab all new files? I'm not so familiar to github to be honest.

@Micke-K
Copy link
Owner

Micke-K commented Mar 7, 2022

Ah sorry, that is me being confusing :)

I don't like creating a release until I know it is ok. I think I must change my whole release process...

You can download the master directly. Go to the code page and click Code and then Download Zip

https://github.com/Micke-K/IntuneManagement/archive/refs/heads/master.zip

@ASMailer
Copy link
Author

ASMailer commented Mar 7, 2022 via email

@Phoenix-DH
Copy link

Works alsom for me now.

@Micke-K
Copy link
Owner

Micke-K commented Mar 7, 2022

Thank you both for testing and reporting back!

I've been thinking about the search. Not sure how to implement it in the best way though. I do agree that it would be best if search/filter generates a new API query. That would probably require some re-write of the list APIs.

Cheers!

@Micke-K
Copy link
Owner

Micke-K commented Apr 26, 2022

You can filter "better" in 3.5.0. If you specify a filter and press Refresh, it will only load applications based on the filter.

Have a try and let me know how it goes

@Phoenix-DH
Copy link

Will try ...

But means that I now have not to change the code again after downloading 3.5.0?

@Micke-K
Copy link
Owner

Micke-K commented Apr 26, 2022

At least not until the next version is released :)

@ASMailer
Copy link
Author

ASMailer commented Apr 26, 2022 via email

@Micke-K
Copy link
Owner

Micke-K commented Sep 10, 2022

Closing this. Please open a new Issue if it is not working as intended.

Cheers!

@Micke-K Micke-K closed this as completed Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants