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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Can someone explain workflow scope and execute as please

(0) ShareShare
ReportReport
Posted on by 130

Dear Dynamics Community,

I've been working with Dynamics for some time and not experienced this issue before, but it would be great if someone could just confirm (or deny) my assumptions. For this example I'm looking at a real-time workflow that is triggered by a field change. 

My understanding of the Scope is this:

User - workflow will only run on the records owned by the owner of the workflow
Business Unit - workflow will only run for records owned by the owner of the workflow or other owners (users or teams) within the workflow owner's business unit
Parent: Child Business Units - workflow will only run for records owned by the owner of the workflow or other owners (users or teams) within the workflow owner's business unit or child business units
Organization: workflow will run on all records

I've tested all of this and it works. The challenge I have is when using Execute As; if I set Execute As to 'The user that made changes to the record', along with scope 'User' my assumption is that the workflow would run on any records that are owned by the person that triggered the workflow (in this case made a change to the trigger field on the specific entity/table the workflow was set up on) rather than just records owned by the owner of the workflow itself, but it doesn't - it still only works on records owned by the owner of the workflow. 

My tests: 

Workflow is real-time, has a Start After trigger for one field, Scope is 'User' and Execute As is 'The user that made changes to the record'

  1. Changing ownership of the workflow to the same user who triggers the workflow (field change) = workflow runs
  2. Changing the ownership of the workflow to a different user from the user who triggers the workflow (field change) = workflow does not run
  3. Setting the workflow to also run on-demand, with the owner of the workflow different to the triggering user of the workflow = workflow runs when on-demand is used (not when triggered)

I should say that this isn't a huge problem at the the moment because running the workflow with 'Organization' Scope will not cause any security issues, I just thought I knew this stuff and my (apparently tiny) brain is struggling to understand. If anyone can explain it simply, please do help! 

My assumption from testing is this:

Scope indicates which set of records the workflow will run on and for automated (i.e. triggered) workflows this is defined by the owner of the workflow. For on-demand workflows the process will take the scope of the person that called the on-demand workflow, not the owner of the workflow. 

Kindest regards,

Matt

I have the same question (0)
  • MattTaylor Profile Picture
    130 on at
    RE: Can someone explain workflow scope and execute as please

    Thanks for replying, Bipin.

    It's good to have someone just confirm it.

    Kind regards,

    Matt

  • Verified answer
    Bipin D365 Profile Picture
    28,981 Moderator on at
    RE: Can someone explain workflow scope and execute as please

    Hi,

    When you set Scope to User -> workflow will only run on the records owned by the owner of the workflow

    This still holds true, Now when you set Execute as to 'User who made the changes'

    Any logic which gets executed in workflow will run under the user who is causing the workflow to trigger. You can confirm this by checking the Created by field when you create any record from workflow/Modified by field when you are updating the record.

    So your understanding is correct.

    Please mark my answer verified if this is helpful!

    Regards,

    Bipin Kumar

    Follow my Blog: xrmdynamicscrm.wordpress.com/

  • MattTaylor Profile Picture
    130 on at
    RE: Can someone explain workflow scope and execute as please

    Having slept on this, I've come to the following conclusion:

    Scope
    This refers to the records that the trigger (e.g. after field update) will run on

    Execute As
    Once the workflow has been triggered, this is the permission levels that the workflow will run with

    Can anyone confirm or correct?

    Kind regards,

    Matt

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
DAnny3211 Profile Picture

DAnny3211 296

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 137 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 87 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans