microsoftgraph / microsoftgraph/msgraph-metadata
Get-MgDirectoryRole does not contain ConsistencyLevel parameter for Search query
Nobody has claimed this yet.
- Dominant language
- XSLT
- Stars
- 166
- Forks
- 55
- Avg merge
- 16h 12m
- Merged PRs (30d)
- 14
Description
When running Get-MgDirectoryRole -Search, you need to include a ConsistencyLevel parameter
$appAdminRole = Get-MgDirectoryRole -Search "DisplayName: Application Administrator"
Get-MgDirectoryRole_List: Request with $search query parameter only works through MSGraph with a special request header: 'ConsistencyLevel: eventual'
But the cmdlet does not have a ConsistencyLevel parameter, as shown below
$appAdminRole = Get-MgDirectoryRole -Search "DisplayName: Application Administrator" -ConsistencyLevel eventual
Get-MgDirectoryRole: A parameter cannot be found that matches parameter name 'ConsistencyLevel'.
And nothing with Get-Command
Get-Command Get-MgDirectoryRole -ParameterName ConsistencyLevel
Get-Command: No matching commands include a parameter named 'ConsistencyLevel'. Check the spelling of the parameter name, and then try again. (Parameter 'ConsistencyLevel')
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the Get-MgDirectoryRole -Search command and inspect the generated definition and metadata used for client library code generation. Verify how query-specific request headers are represented for Microsoft Graph operations. Done means the cmdlet accepts ConsistencyLevel and the search request includes the required eventual consistency header.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100