Hi gurus!
I am really new to Power Automate and have an flow that sets item level permissions on a Document Set in SharePoint. I've got my flow running successfully but there's one part of it that I want to tighten up a bit.
Here's a very basic example of what I have now and what I need:
My register is HR based and captures an employee record with their management structure i.e. Employee, Line Manager, Middle Manager, Executive Manager. Line Manager can only be people. Middle and Executive Manager can be a person or a SharePoint Group. Each of the people or groups defined in the Manager fields need Contribute access to the doc set.
I am collecting the contents of the Manager fields into a variable their display names and then dropping them into an array.
I've learned (the hard way) that the Flow commands to set item level security for People are different to setting them for SharePoint Groups.
I have a Condition that checks each entry in an array - and here is where I need the help! - by display name. All the defined SharePoint Group names start with the text "EDMS", so that's what I am testing for:
If varArray starts with EDMS - then it's a SharePoint Group and goes down the Yes path, otherwise it goes down the No path.
What I want then is a way for my condition to find out if the value is a SharePoint Group without having to rely on how the group is named or any other thing that can be changed by the user.
I figure lots of people have done exactly that but the last few days of me searching have not revealed the answer to me.
All suggestions gratefully received!
Kind regards
Sara