Power Apps Portal Liquid - List Active Directory User Groups

199 views Asked by At

I've been familiarizing myself with Power Apps Portals for the past month or so. I've looked into creating Dataverse tables, importing data for tables via Excel, querying said tables with Fetch XML on a Portals page with Liquid.NET, etc.

That being said, what I am trying to figure out is - how can I query a given Active Directory server, either with an on premise server or some AD instance in the cloud to get a current logged in user's user group?

I'm using the security group of the user to render specific reports on the page, like PowerBI, etc.

Has anyone created liquid code or done something else to help accomplish this on a Power Apps Portals page? If so - I would like to see an example.

1

There are 1 answers

2
SiddheshDesai On

I tried fetching the current logged in User’s group via Power apps flow like below :-

enter image description here

I logged into my Azure AD Portal with an Admin account and used Get User to get the details of the current logged in Admin account and fetched its Group membership and the group that user is a part of.

Output:

enter image description here

enter image description here

enter image description here

You can refer these documents to get the Users and Group from AD security group :-

Get Users Or Members From The AD Security Group In PowerApps (c-sharpcorner.com) by Dhruvin Shah

How to check if a user is part of Office365Group in Power Apps canvas apps - Debajit’s Power Apps & Dynamics 365 Blog (debajmecrm.com) by Debajit Dutta