web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
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!
 
I have the same question (0)
  • RudyZhang Profile Picture
    Microsoft Employee on at
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 61 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 52 Super User 2025 Season 2

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 42 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans