When I execute the following request URI in Graph Explorer
https://graph.microsoft.com:443/v1.0/servicePrincipals/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/appRoleAssignedTo
I get 100 results back with nextLink property. This is correct as I have more than 100 app role assignments in my Azure AD for the Service Principal.
When I execute the following request URI in Graph Explorer https://graph.microsoft.com:443/v1.0/servicePrincipals/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/appRoleAssignedTo?$filter=startsWith(principalDisplayName, 'G')
I get 31 results back and no nextLink property. This is correct as I only have 31 users in my Azure AD whose display name starts with G.
When I execute the following request URI in Graph Explorer https://graph.microsoft.com:443/v1.0/servicePrincipals/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/appRoleAssignedTo?$top=5
I get 5 results back and at this time nextLink property is available in the response. This is also correct. I can use the nextLink property to get the next set of results.
Now, when I execute the following request URI in Graph Explorer https://graph.microsoft.com:443/v1.0/servicePrincipals/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/appRoleAssignedTo?$filter=startsWith(principalDisplayName, 'G')&$top=5
I only get 5 results back (which is correct) but no nextLink property. Considering there are 26 more users available, shouldn't the API be returning a nextLink?
I guess my question is that why is there an ambiguous behavior with $filter and nextLink?
Is there no pagination support when both query parameters defined?
Sourced from https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/1054