cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

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
Highlighted
Community Support
Community Support

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

4 REPLIES 4
Highlighted
Community Support
Community Support

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

Highlighted
Frequent Visitor

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

Hi

This does not work with Sharepoint list.

Any ideas ?

cheers

Highlighted
Frequent Visitor

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

Highlighted
Helper I
Helper I

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

@v-xida-msft , It is always showing true though the current login user is not having Read Permission. what might went wrong?

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,702)