cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
halifaxious
Resolver II
Resolver II

check if team has role in Power Automate

In my model driven app I have a table, Profit Centre which has the field delegatedTeam. delegatedTeam is a lookup to the built-in Team table. There is a business requirement that the delegatedTeam be assigned the security role PCdelegate.

 

I'm building a flow that is triggered by a change in the delegatedTeam  field.

  • Do I need to check if the team has the required role?
  • Or can I just relate the required row to the team without checking?
  • If I have to check, how do I list the team's existing roles?  (teams <-> security roles is many-to-many)
1 ACCEPTED SOLUTION

Accepted Solutions
EricRegnier
Super User
Super User

Hi @halifaxious,

Why do you need to check? You can update the row directly and if the team doesn't have the right privileges then the update operation will fail. If for whatever reason you need to check, suggest to check instead by security role by another field/column (or new one if it doesn't exist) on Team that can give you the right filtering.

The N-N (many-to-many) table that relates a team to security role is "teamroles_association" BTW.

Hope this helps!

View solution in original post

5 REPLIES 5
EricRegnier
Super User
Super User

Hi @halifaxious,

Why do you need to check? You can update the row directly and if the team doesn't have the right privileges then the update operation will fail. If for whatever reason you need to check, suggest to check instead by security role by another field/column (or new one if it doesn't exist) on Team that can give you the right filtering.

The N-N (many-to-many) table that relates a team to security role is "teamroles_association" BTW.

Hope this helps!

halifaxious
Resolver II
Resolver II

It's possible that the Team may already have the required role. I wasn't sure if Power Automate would gracefully handle trying to link the same role to a team twice.

No PA or Dataverse won't assign roles automatically

halifaxious
Resolver II
Resolver II

I think there's a misunderstanding. I was not expecting a team to get a role without intervention. I was concerned that if a team already had "role X", giving it "role X" again would break something. Evidently I don't need to worry about that.

Got it, and no you don't need to worry about it 🙂

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Users online (1,904)