cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

What are the possibilities to identify whether logged in user has access on SharePoint list used as connector?

Hello,

 

I require to display custom message to user, if User has no access on SharePoint list.

 

I could figure out two possibilities:

 

1) Add Office 365 group in SharePoint list and check the current user membership using, Office 365 Connector in PowerApps, However App can not be shared to Office 365 Group, that's why this does not work.

 

2) Add Azure AD Security group in SharePoint List and check current user membership using Azure AD Connector, however, this connector requires, following permissions to have to user with whom App is shared, However due to organization limitation, following permissions can not be shared with all users who has access on the app:

 

  • Directory.ReadWrite.All
  • Group.ReadWrite.All
  • User.ReadWrite.All

Can anyone please suggest which is an another way to identify whether logged in user has access on SharePoint list or not?

 

Thanks and Regards,

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @dave8 ,

Yeah, you are right. The Office365Groups.ListGroupMembers() function could only return 999 users at most once time in PowerApps, it is an known limit with Office 365 Groups.

 

If you want to get rid of this '999' limit, I think a customer connector in PowerApps could achieve your needs. You could consider create a custom connector based on Microsoft Graph REST API, then specify "List members" action path within this custom connector.

After that, you could use this custom connector action to list members of a specific group without the '999' limit. More details about creating a custom connector based on Microsoft Graph REST API, please check the following article:

https://gotoguy.blog/2017/12/17/access-microsoft-graph-api-using-custom-connector-in-powerapps-and-f...

 

More details about the "List members" action path you should specify within your custom connector, please check the following article:

https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http

 

Best regards,

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

8 REPLIES 8
Super User III
Super User III

HI @dave8 ,

This may be a bit clunky, but I have a hidden gallery based on one of my smaller reference lists and a label on the first screen with

If(
   CountRows(MyGalleryName.AllItems)>0,
   "Welcome " & User().Fullname,
   User().FullName & " - Please request access to this data from xxxxx"
)

and also disable the entry button on the same test.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Community Support
Community Support

Hi @dave8 ,

Do you want to check if the current login user have access to SP List data source in your shared app?

 

Based on the needs that you mentioned, I think the DataSourceInfo function could achieve your needs. Please consider take a try with the following workaround:

If(
   DataSourceInfo('Your SP List', DataSourceInfo.ReadPermission) = true,
   Notify("Access Successfully", NotificationType.Information),
   Notify("You do not have Resd permission to SP List used in this shared app.", NotificationType.Error)
)

 

In addition, actually, you could share a canvas app to a Office 365 Group in PowerApps currently. Please check the following article for more details:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/share-app#share-an-app-with-office-365-...

 

Best regards,

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.

Thank you @WarrenBelz 

 

But, there is a possibility that user has access on the list and yet having zero records, in this case, this formula will not help for the objective 😞

 

Thank you again!

Thank you for the details of Datasourceinfo, however it did not work out, even if user does not have/have an access, It always returns DataSourceInfo('Your SP List', DataSourceInfo.ReadPermission) = true

 

However, I am checking the impact of converting O365 group into security group. In this case, can you please share, what permission all app users should be having on O365 group? OR it doesn't require anything as such?

 

Thanks and Regards,

I could see that Office 365 group can work if it's a security enabled group, however in PowerApps it only returns 999 members and I am unable to verify the check against the group members as I have more than 1500 group members.

 

Is there any other possibility?

 

Thanks and Regards,

 

 

Hi @dave8 ,

I have been offline for a few hours.

I am not a user of the Office365 people facility probably for the same reason as you with the size of the organisation.

I keep reference lists for the area team as per my original post and these have served very well for some time.

I am happy to guide you if you want to go down this track otherwise you have some other posts on this thread that may assist you.

New Member

test

Hi @dave8 ,

Yeah, you are right. The Office365Groups.ListGroupMembers() function could only return 999 users at most once time in PowerApps, it is an known limit with Office 365 Groups.

 

If you want to get rid of this '999' limit, I think a customer connector in PowerApps could achieve your needs. You could consider create a custom connector based on Microsoft Graph REST API, then specify "List members" action path within this custom connector.

After that, you could use this custom connector action to list members of a specific group without the '999' limit. More details about creating a custom connector based on Microsoft Graph REST API, please check the following article:

https://gotoguy.blog/2017/12/17/access-microsoft-graph-api-using-custom-connector-in-powerapps-and-f...

 

More details about the "List members" action path you should specify within your custom connector, please check the following article:

https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0&tabs=http

 

Best regards,

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

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (43,926)