Graph API - How to filter Users and Groups only?

user20201 346 Reputation points
2021-04-20T06:40:34.793+00:00

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

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Answer accepted by question author
  1. JamesTran-MSFT 37,226 Reputation points Microsoft Employee Moderator
    2021-04-20T22:05:06.747+00:00

    @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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.