cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

IMP:SharePoint groups in Powerapps

Hello,

 

Has anyone tried below scenario?

1. I have set of users in sharepoint group

2. On load of powerapp, I will check if current user belongs to Sharepoint group

3. If he is part of the group, then load all the items in the screen

 

I am unable to achieve this for some reason. Can anyone please share your inputs.

7 REPLIES 7
Highlighted
Super User II
Super User II

Re: IMP:SharePoint groups in Powerapps

There isn't any functionality that I am aware of that will get members of a SharePoint group. You could create a list in your site that contains all the users that should have access to all the fields and then OnStart or OnVisible of PowerApps you could pull that information in and use it to determine if the user can see all the fields or just some of them.



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
Highlighted
Regular Visitor

Re: IMP:SharePoint groups in Powerapps

Hello,

Thank you for the response. I am afraid that we cannot read it from list as there are many users whom we should maintain. And also I believe saving in list is not recommended.

It’s really important that there should be option to view based on sharepoint and there will be many actions which we perform based on groups.

Hope Microsoft introduces this.
Highlighted
Super User
Super User

Re: IMP:SharePoint groups in Powerapps

@shwethegde

 

this could be a workaround. i can't confirm it as I can't check for other users.

 

First, add any one of the exisitng lists in your sharepoint group as a datasource. If you don't have a list just creat a dummy list so that you can connect to sharepoint. Note: the list should have the same permission as the sharepoint group

 

then, to test this out insert a label in the app and set its text property to 

If(IsEmpty( Errors('SharepointListname')),"true","false" )

 

So , if the user has permissions, no errors will be returned, whereas if the user isn't a part of the sharepoint group some permission error will be returned and thus the Errors table won't be empty.

 

Check and let me know if it works. You will probably have to ask someone outside the group to open the app and check it.


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Super User
Super User

Re: IMP:SharePoint groups in Powerapps

@shwethegde

 

the earlier one might not work, so try this -

 

If(DataSourceInfo( 'SharepointListName', DataSourceInfo.ReadPermission),"has access","doesn't have access")

or 

If(DataSourceInfo( 'SharepointListName', DataSourceInfo.EditPermission),"has access","doesn't have access")

 

Check this for DataSourceInfo documentation https://docs.microsoft.com/en-us/powerapps/functions/function-datasourceinfo 

 

 


Vivek Bavishi aka That API Guy
PowerApps and Flow MVP
Blog | Twitter | YouTube | Community Profile | GitHub



If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: IMP:SharePoint groups in Powerapps

This is clever...  

 

The only downside is the underlying sharepoint list holding the data doesn't know anything about the PowerApps trick, so that data in those columns you hide in PowerApps could be viewed in the underlying list if the user has access to the list

 

It may be better to store the data you want to hide in another list and set the form to read data from the list holding that secure data...

Highlighted
Anonymous
Not applicable

Re: IMP:SharePoint groups in Powerapps

Hi,

 

It is late, probably too late. However, the community continued to work. Here is a link which can help you out.

Vote the idea here

 

Answer to your prayers

 

Have a look and feel free to discuss further.

Highlighted
Anonymous
Not applicable

Re: IMP:SharePoint groups in Powerapps

that only works if you have an Admin Flow license..

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,191)