Skip to main content

Notifications

Announcements

No record found.

Service | Customer Service, Contact Center, Fie...
Unanswered

Assigning Security Roles Using Power Automate

(1) ShareShare
ReportReport
Posted on by 10
Hi everyone,
 
I need a little bit of help regarding a Power Automate flow I'm creating.
 
This is how the flow looks so far:

1) The flow triggers whenever a new User gets created in Dynamics 365 CE. The next action after the trigger is the 'List a row by ID'. This is what I filled in in that action:

Table: teammemberships
Filter rows: systemuserid eq @{triggerOutputs()?['body/systemuserid']}

2) Then a Apply To Each action

Select an output from the previous steps: @{outputs('ListTeams')?['body/value']}

3) Within the Apply To Each action I have a Condition action:

Left side of condition: @outputs('ListTeams')?['body/value']
Operator: is equal to
Right side of condition: G.A-Case365-All

Yes Branch:

Update row by ID:

Table name: Users
Row ID: @{triggerOutputs()?['body/systemuserid']}
Business Unit: /dlw_businessunitdemes(b708d2be-6650-ed11-bba3-000d3adf7e97)

List a row by ID:

Table name: Security Roles
Filter rows: name eq 'General' or name eq 'Test' or name eq 'Dynamics Test'
 
So the flow updates the business unit of the newly created user if that user belongs to a specific team. Well now I need to add the above three roles to that user as well. Can someone explain in detail how to go about this?
 
Thanks!
 
  • RudyZhang Profile Picture
    RudyZhang Microsoft Employee on at
    Assigning Security Roles Using Power Automate
    Hi,
     
    Is your reference to the /teammembership/ entity a custom entity? We didn't find a corresponding entity in the list of out-of-the-box entities.
     
    We found posts related to your question in the PowerApps Community and PowerAutomate Community, please refer to the links below.
    https://powerusers.microsoft.com/t5/General-Power-Automate/Assign-Dataverse-Security-Roles-to-Team-using-Power-Automate/td-p/2100967
     
    https://powerusers.microsoft.com/t5/Power-Platform-and-Dynamics-365/Assign-Security-role-using-power-automate-flow-to-Owner-team-of/m-p/1951997#M622
     
     
    Best Regards,
    Rudy Zhang

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans