question

user2021 avatar image
0 Votes"
user2021 asked azure-cxp-api edited

Graph API - How to filter Users and Groups only?

I can see that the "Service Principal" object type also appears in Users and Groups tab in Azure AD. In MS Graph Explorer, I like to get the Users and Groups only of my application. Are there possible ways to filter the response or not to return the "Service Principal" type in the response?

89385-service-principal.png


azure-active-directoryazure-ad-graph
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.

1 Answer

JamesTran-MSFT avatar image
0 Votes"
JamesTran-MSFT answered

@tobias2021
Thank you for your post!

If you're using the List appRoleAssignments granted for a service principal API, you should be able to use the OData query parameters to help customize the response. For more info - OData system query options


If you have any other questions, please let me know.
Thank you for your time and patience throughout this issue.


Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

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.