question

AndrewOmondi-5314 avatar image
0 Votes"
AndrewOmondi-5314 asked JaredFelsman-0786 commented

Pagination support for app role assignments when both $filter and $top are defined

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

microsoft-graph-applications
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Update: It is confirmed that this is a bug.

1 Vote 1 ·

We will check this, please wait a moment.

0 Votes 0 ·

1 Answer

CarlZhao-MSFT avatar image
0 Votes"
CarlZhao-MSFT answered JaredFelsman-0786 commented

I can reproduce your problem. After my repeated testing. According to our experience, it should definitely return @odata.nextLink, but as you can see, it does not return nextLink, and I also checked the official doc, but there is no special explanation about it.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

There is also no @odata.nextLink available for users appRoleAssignment in either of the following :

https://graph.microsoft.com/v1.0/users/{User ID}/appRoleAssignments


https://graph.microsoft.com/v1.0/me/appRoleAssignments


Is this the same issue?

0 Votes 0 ·