microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Get-MgIdentityGovernanceAppConsentRequest (almost) infinite loop since 6/3/2025 2 AM
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Describe the bug
Since 6/3/2025 2 AM command Get-MgIdentityGovernanceAppConsentRequest returns (in our case) 17400 consent requests instead of 102 (information retrieved by Get-MgIdentityGovernanceAppConsentRequestCount). This is obviously a bug and is related to some underlying API change around the mentioned date.
Expected behavior
Get-MgIdentityGovernanceAppConsentRequest returns a correct number of existing admin requests instead of some random super high number.
How to reproduce
Just run Get-MgIdentityGovernanceAppConsentRequest (any version, its API related) and compare the returned number of results with Get-MgIdentityGovernanceAppConsentRequestCount
SDK Version
2.25.0
Latest version known to work for scenario above?
No response
Known Workarounds
$requestsCount = Invoke-MgGraphRequest -Uri "https://graph.microsoft.com/v1.0/identityGovernance/appConsent/appConsentRequests/`$count"
Invoke-MgGraphRequest -Uri "https://graph.microsoft.com/beta/identityGovernance/appConsent/appConsentRequests" | Get-MgGraphAllPages | select -First $requestsCount
Debug output
Click to expand log
```</details>
### Configuration
Name Value
---- -----
PSVersion 7.4.10
PSEdition Core
GitCommitId 7.4.10
OS Microsoft Windows 10.0.19045
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0, 5.0, 5.1, 6.0, 7.0}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
### Other information
_No response_
Contributor guide
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 Get-MgIdentityGovernanceAppConsentRequest and comparing its results with Get-MgIdentityGovernanceAppConsentRequestCount. Use the reported Invoke-MgGraphRequest and Get-MgGraphAllPages workaround to compare the underlying v1.0 and beta responses. Done means the cmdlet returns the correct number of existing consent requests without looping or producing duplicates.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100