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!
 
  • RudyZhang Profile Picture
    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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,925 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans