cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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.

View solution in original post

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.

View solution in original post

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
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 322 members 6,266 guests
Please welcome our newest community members: