3
votes

Removing my code as part of the equation, I was able to reproduce this through the Microsoft Graph API Explorer.

First, I Do a GET https://graph.microsoft.com/v1.0/users?$filter=assignedLicenses%2fany(d%3ad%2fskuid+eq+ --actualySKUIDHere--)

I get results back like

{ "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users", "@odata.nextLink": "https://graph.microsoft.com/v1.0/users?$filter=assignedLicenses%2fany(d%3ad%2fskuid+eq+ --actualSKUIDHere-- )&$skiptoken=X%27 --actualtokenhere-- %27", "value": [ {

I copy paste the nextLink into the API Explorer ie. https://graph.microsoft.com/v1.0/users?$filter=assignedLicenses%2fany(d%3ad%2fskuid+eq+ --actualSKUIDHere-- )&$skiptoken=X%27 --actualtokenhere-- %27

and it works with good results like above, but the next skipToken is shorter and copy & pasting it will result in the following

{ "error": { "code": "Directory_ExpiredPageToken", "message": "The specified page token value has expired and can no longer be included in your request.", "innerError": { "request-id": "4cce84ea-83c5-403a-98d2-5ad5c948fcdc", "date": "2020-02-03T21:04:43" } } }

I'm assuming this is a bug but wanted to post to see if anyone else has experienced this and has a resolution

1
I'm using the exact same filter as you. I get the first page fine but I get the same ExpiredPageToken when trying to get the next page. Looks like a bug and I hope MS folks here can take a look.Ryan
Wanted to add that if your results are small enough you can increase the pagesize as a workaround ie: https://graph.microsoft.com/v1.0/users?$top=999&$filter=assignedLicenses/any(x:x/skuId eq [skuID])Ryan
I'm experiencing the same when using the Microsoft Graph SDK for Java and opened an issue on their Github tracker: github.com/microsoftgraph/msgraph-sdk-java/issues/368jansohn

1 Answers

-1
votes

This was a temporary service issue which has been fixed since. You should not try to parse/modify the next link in your application, simply use it as provided by the service.