cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Maheshchatla1
Helper I
Helper I

Sharepoint groups implementation in power apps

Hi Team, 

 

Is it Possible to use , SharePoint User Groups in Power apps ?

 

We have scenario like HR,Finance,XYZ. Based on on logged in user group , We need to show/hide controls in Powerapps forms?(we would like check the current user's SharePoint Group in Power apps)

 

Please suggest the best suitable approach .

 

Thanks in Advance.

 

Regards,

Mahesh.

1 ACCEPTED SOLUTION

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @Maheshchatla1,

 

So far the only available connector of user profiles is Office365 Users connector, which actually gets the user profiles from Azure AD. So you cannot get SharePoint groups in PowerApps for now. You could vote on below post if you want to have this feature to be included:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/get-sharepoint-groups-from-sharepoint-site-in-po...

 

Regards,

Mona Li

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

9 REPLIES 9
v-monli-msft
Community Support
Community Support

Hi @Maheshchatla1,

 

So far the only available connector of user profiles is Office365 Users connector, which actually gets the user profiles from Azure AD. So you cannot get SharePoint groups in PowerApps for now. You could vote on below post if you want to have this feature to be included:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/get-sharepoint-groups-from-sharepoint-site-in-po...

 

Regards,

Mona Li

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


@v-monli-msft wrote:

Hi @Maheshchatla1,

 

So far the only available connector of user profiles is Office365 Users connector, which actually gets the user profiles from Azure AD. So you cannot get SharePoint groups in PowerApps for now. You could vote on below post if you want to have this feature to be included:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/get-sharepoint-groups-from-sharepoint-site-in-po...

 

Regards,

Mona Li


I have to say, I'm surprised that the ability to determine a user's SharePoint group membership has not been included in PowerApps by now.   Folks definitely need to upvote this.

Anonymous
Not applicable

Here is the answer to your prayers.

 

Click here.

Anonymous
Not applicable

This works well, thanks! Hope we get a standard function to access SharePoint groups in the future. 

Anonymous
Not applicable

Why did you mark this as solved? I realize you got what you wanted out of it, but the response is hardly an answer to anyone's prayers in terms of being able to do this easily. Lots of moving pieces. If any tweaks are made to the way SP interacts with REST APIs it'll break. The posted solution is basically doing MS's work for them. The solution is the code and logic that THEY should be abstracting away behind a good implementation for US to use directly in PowerApps. Marking this as solved means they may not look at the upvotes to see if this is a feature people still want. These new products from MS (Flow, PowerApps and the claims made abou thow they interact with SP) are lacking in a LOT of features, but this community is full of so many people who just want to fix their own thing and skip along on their merry way so they can get that sweet sweet MVP badge. Make your stuff work better, MS, and give better consideration to basic features people are asking for instead of farming out your tech support to supplicants for MVP status.

Anonymous
Not applicable

This is a great solution! cheers for posting.

Absolutely agree with @Anonymous 

Anonymous
Not applicable

As a work around you can:

  • Create a new list on your target SharePoint site - e.g. "Group Memberships".
  • Create an item for each group, where the item title is the group name.
  • Set unique permissions on each item so that only the specific group has access to see that item.
  • In the PowerApp, add this list as a data source. You can then use filter the items on this list. If the user can see the item it means they are in the group. Use this to determine what is visible or not in the power app.

IMO, using Power Automate to determine group membership is a better approach.   I have a flow I built which will check your group membership by querying several groups in parallel and returning results to the Power App, from which you can set flags and use those throughout the application.   I run it on App startup and it works perfectly.  I based it on one of Geetha Sivasailam's articles with some tweaks:  Advanced | Flow of The Week: Role Based Security in PowerApps using Flow & SharePoint Groups | ...

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,923)