cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
misc
Helper V
Helper V

Gallery filter to a sharepoint permissions group

My app needs to have records visible to all members of a certain SP permission/Office 365 group, as well as the creators of the record and other users who have the record shared with them.  

 

Originally, I had a long-winded and not very slick set up where the filter looks for a user's email in a column, and provides access based on that.

SortByColumns(If(
    Searchdpd.Selected.Value = "All Buildings", 
    Filter(
	    Search('LAB01', SearchBox.Text, "d6rj", "hcim"),
'Creator Email'=varUserEmail||varUserEmail in Split(SharedWith,"; ")||varUserEmail in Split(BPs,"; ")||varUserEmail in Split(EP,"; ")||varUserEmail in Split(Bravo_x0020_shift,"; ")||varUserEmail in Split(Charlie_x0020_shift,"; ")||varUserEmail in Split(Delta_x0020_shift,"; ")),
        Filter(
	Search('LAB01', SearchBox.Text, "d6rj", "hcim"),
'Creator Email'=varUserEmail||varUserEmail in Split(SharedWith,"; ")||varUserEmail in Split(BPs,"; ")||varUserEmail in Split(EP,"; ")||varUserEmail in Split(Bravo_x0020_shift,"; ")||varUserEmail in Split(Charlie_x0020_shift,"; ")||varUserEmail in Split(Delta_x0020_shift,"; "),Searchdpd.Selected.Value = Building)), "OData__x0062_et4", Ascending)

This didn't seem to be working for certain users who should be able to view everything so I wanted to update it with a better solution.

 

I wanted to essentially follow these instructions for providing the permissions to the Office365 group: https://medium.com/@brettjrandall/powerapps-hide-buttons-objects-based-on-office-365-group-membershi... 

but I am not able to find the group ID anywhere (I cannot follow the Graph instructions it provides in the article, and when I follow other instructions to find it via outlook this is not available either). 

 

Is there another solution for me to follow to provide access to a certain sharepoint permissions groups, or office 365 groups while limiting it for other users?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Community Champion
Community Champion

Hi @misc 

 

You can get the list of security groups 

Office365Groups.ListOwnedGroupsV2().value

Insert a gallery and set the Items property

 

StalinPonnusamy_0-1635425079856.png


Thanks,
Stalin - Learn To Illuminate

View solution in original post

4 REPLIES 4
StalinPonnusamy
Community Champion
Community Champion

Hi @misc 

 

I have a blog that uses the SharePoint Security group which describes the step by step. Please refer to this.

 

Let me know if any questions. I'm happy to answer.


Thanks,
Stalin - Learn To Illuminate

 

Thank you. I'm still getting stuck at trying to find the group ID - I don't have admin privileges for my company so I can't use the admin centre either.

The most frustrating thing is I've done this for another app and it works fine, I just can't remember how I got that group ID. I'm going to have to put a call in with our IT team who might be able to fish it out for me, I was just trying to avoid that as it takes a while for an answer. Once I get that far I'll try your steps and see if that does it. thanks

StalinPonnusamy
Community Champion
Community Champion

Hi @misc 

 

You can get the list of security groups 

Office365Groups.ListOwnedGroupsV2().value

Insert a gallery and set the Items property

 

StalinPonnusamy_0-1635425079856.png


Thanks,
Stalin - Learn To Illuminate

View solution in original post

This worked! Thank you!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,369)