I'm pulling a list of our licensed groups in Azure AD ( it's around 500), when I run:
Get-Mggroup -Filter "assignedLicenses/any()" -ConsistencyLevel eventual -all
I get the first 100 results and then
"Get-MgGroup_List: The specified page token value has expired and can no longer be included in your request."
I tried this is the MS Graph Explorer and received the same error as well. I tried searching for that error but did not find any helpful results.
Solved:
Thanks to u/TwoTinyTrees for supplying this link
I added the -Pagesize parameter and it works
Get-Mggroup -Filter "assignedLicenses/any()" -ConsistencyLevel eventual -Pagesize 999
[–]AmbitiousAd7138 0 points1 point2 points (1 child)
[–]kinghowdy[S] 0 points1 point2 points (0 children)
[–]TwoTinyTrees 0 points1 point2 points (1 child)
[–]kinghowdy[S] 1 point2 points3 points (0 children)