microsoftgraph / microsoftgraph/msgraph-sdk-powershell

-All parameter should automatically set -PageSize=999

Open
#2,769 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:feature
Dominant language
C#
Stars
898
Forks
230
Avg merge
2d 5h
Merged PRs (30d)
31

Description

When listing all items, it's much more efficient to query the maximum Microsoft Graph PageSize, 999 items ($top parameter), instead of the default 20.
The -All queries could be up to 50 times faster, as it reduces roundtrips using @odata.nextLink.

If a query has -All parameter, it should automatically set -PageSize 999 if not otherwise specified in the query.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the PowerShell cmdlets that accept -All and -PageSize, then check how Microsoft Graph pagination follows @odata.nextLink. Done means -All uses PageSize 999 unless the caller explicitly supplies another value, with the behavior covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.