graph API find users with a certain application

Matthias Veelaert 21 Reputation points
2022-03-23T08:59:20.91+00:00

Hi there,

I want to be able to list all the users that have a certain application installed using graph API. Any way to be able to do this? I have the application ID but I have no idea about how to use this using graph API.

Thanks!!

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

1 answer

Sort by: Most helpful
  1. Shweta Mathur 30,426 Reputation points Microsoft Employee Moderator
    2022-03-23T12:51:22.693+00:00

    Hi @Matthias Veelaert ,

    Thanks for reaching out.

    I understand that you are looking to get all users using specific application using Graph API.

    You can achieve this by using service principal id in below endpoint.

    https://graph.microsoft.com/beta/servicePrincipals/{id}/appRoleAssignedTo

    186010-image1.png

    You can get the Service Principal Id from Enterprise Applications by selecting the object id of that application.

    186059-image2.png

    Reference to get more details - https://learn.microsoft.com/en-us/graph/api/serviceprincipal-list-approleassignedto?view=graph-rest-1.0&tabs=http

    Hope this will help.

    Thanks,
    Shweta

    ------------------------------------------

    Please remember to "Accept Answer" if answer helped you.

    0 comments No comments

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.