App Registration to get list of Azure AD users and groups

Oh, Tony 0 Reputation points
2023-11-10T17:13:35.3566667+00:00

Need to get list of users and groups from Azure AD using App Registration. Who needs to do admin content for my App Registration so that I can get the list of Azure AD users and groups from Graph?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,080 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 16,111 Reputation points Microsoft Employee
    2023-11-13T10:16:19.94+00:00

    @Oh, Tony Thanks for reaching here!

    You may refer to below document link-

    Delegated permissions, Application permissions, and effective permissions - Microsoft Graph permissions reference.

    You can understand the required permissions for each API by looking at relevant documentation.

    1.   For users/{1}/memberOf it will be List memberOf

    2.    For getting all groups - List Groups

    If it's just these two calls in your application, Directory.Read.All would be the least privilege required. In case there are other calls, look at their documentation.

    Admin Consent-

    This depends on what permissions you finally end up deciding as required for your application.

    1.  You can see it directly in Azure portal. When setting required permissions for your application, each permission has a yes or no next to it to indicate whether Admin consent is required or not.

     

    0 comments No comments