Use Graph API to get the Active directory group of other users

Smith, Stuart 1 Reputation point
2021-04-14T16:35:19.857+00:00

Hi there,

I have an PowerApps application and I need to be able to check the Active Directory Group IDs of any employee that is searched for and selected within the application.
So that the user interface can be configured based on the selected employee's AD group memberships.
We already user a standard officeusers connector to get many employee details.
However AD groups ID are need to maintain specific lists of employees, whom are eligible for different configurations in the app.

I want to use a similar approach as mentioned in this guide for implmenting role based security https://powerapps.microsoft.com/en-us/blog/implementing-role-based-permission/

I have tested this but it will only fetch the AD groups of the logged in user. not for any employee.

is there a way to use the Graph APi to do this?

or is there an alternate way? fundamentally i just need to be able to maintain lists of employees can cal be called effeciently. SharePoint lists are too slow. AD groups are best as these are already maintained by the organisation.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,672 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Diana Wanjuhi 1,376 Reputation points
    2021-04-15T09:39:36.977+00:00

    Hello @Smith, Stuart in your case, you can use application permissions instead of delegated for your application. This would allow your application to call list memberOf passing in the specific employee's user ID or UPN, check for membership and configure the UI based on the employee's group memberships.

    Please let me know if this is what you were looking for,

    Diana.