cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
satya
Level: Powered On

User Existed or not in SharePoint Groups in Power Apps

Hi, i have created a power app and i need to check the user exsited or not in SharePoint Groups like Visitor, Admin,Editors Group. could you please help me.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: User Existed or not in SharePoint Groups in Power Apps

Hi @satya,

Do you want to check if a user is existed or not in your SharePoint Group like Visitors, Admin and Editors Group within an app?

If you want to check if a user is existed or not in a SharePoint Groups like Visitors, Admin and Editors Group within an app, I afraid that there is no direct way to achieve your needs in PowerApps currently.

As an alternative solution, if a user is existed in your SharePoint Group like Visitor, Admin and Editors group, the user should have Read Permission to access your SP site at least, so I think the DataSourceInfo function could achieve your needs.

I have made a test on my side, please take a try with the following workaround:3.JPG

Set the Text property of the Label control to following formula:

DataSourceInfo('20181105_case14',DataSourceInfo.ReadPermission)

On your side, you should type following:

DataSourceInfo(
'YourSPList', /* <-- This data source could be a SP list or a SP library */
DataSourceInfo.ReadPermission
)

If the current login user of your app is not existed in your SharePoint Groups like Visitor, Admin, Editors Group, in other words, he don't have Read permission to access your SP list, this function would return false.

More details about the DataSourceInfo function in PowerApps, please check the following article:

DataSourceInfo function

 

Best regards,

Kris

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

Re: User Existed or not in SharePoint Groups in Power Apps

Hi @satya,

Do you want to check if a user is existed or not in your SharePoint Group like Visitors, Admin and Editors Group within an app?

If you want to check if a user is existed or not in a SharePoint Groups like Visitors, Admin and Editors Group within an app, I afraid that there is no direct way to achieve your needs in PowerApps currently.

As an alternative solution, if a user is existed in your SharePoint Group like Visitor, Admin and Editors group, the user should have Read Permission to access your SP site at least, so I think the DataSourceInfo function could achieve your needs.

I have made a test on my side, please take a try with the following workaround:3.JPG

Set the Text property of the Label control to following formula:

DataSourceInfo('20181105_case14',DataSourceInfo.ReadPermission)

On your side, you should type following:

DataSourceInfo(
'YourSPList', /* <-- This data source could be a SP list or a SP library */
DataSourceInfo.ReadPermission
)

If the current login user of your app is not existed in your SharePoint Groups like Visitor, Admin, Editors Group, in other words, he don't have Read permission to access your SP list, this function would return false.

More details about the DataSourceInfo function in PowerApps, please check the following article:

DataSourceInfo function

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
asadrajput
Level: Powered On

Re: User Existed or not in SharePoint Groups in Power Apps

Hi

This does not work with Sharepoint list.

Any ideas ?

cheers

Arpit
Level: Powered On

Re: User Existed or not in SharePoint Groups in Power Apps

It desn't work with SharePoint Lists.

I have created one user who is having following permission.

Site Level: Read Permission

List Level: Read Permission

 

When I add following text in label it shows the true for all the user. 
DataSourceInfo('My List',DataSourceInfo.DeletePermission)
Ideally, It should return false to that user as that user is having only read permission on site and list both.

 

Thanks

Arpit

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 295 members 4,446 guests
Please welcome our newest community members: