microsoftgraph / microsoftgraph/msgraph-sdk-powershell

BUG: ConsistencyLevel: Eventual header should be enabled for advanced queries or all results will be returned regardless

Open
#513 28 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

https://developer.microsoft.com/en-us/identity/blogs/microsoft-graph-advanced-queries-for-directory-objects-are-now-generally-available/
The consistencylevel: eventual header should automatically be set if parameters such as -Search, -Count, -OrderBy, and -Filter if an operation parameter is used.

Workaround

Invoke-GraphRequest

-Headers @{ConsistencyLevel='eventual'}

AutoRest-Generated Commands

-ConsistencyLevel Eventual
This should be safe for general profile usage as well in substitute for doing the above:
$PSDefaultParameterValues['Get-Mg*:ConsistencyLevel'] = 'Eventual'

AB#7724

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 with the Invoke-GraphRequest entry point and the AutoRest-generated commands, then trace how -Search, -Count, -OrderBy, and -Filter are handled. Compare their behavior with the ConsistencyLevel parameter and the linked Microsoft Graph guidance. Done means advanced-query parameters automatically send the eventual consistency header without requiring a workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.