How to bulk change owner of Workflows and Power Automate flows using advanced find in Dynamics 365

Do you have users no longer active in your environment? Perhaps a user has quit the company and still is the owner of workflows and Power Automate flows in your environment. This might cause functionality to stop and errors occur because the user is inactive or no longer has a valid license. This post shows how to change an owner of workflows and power automate flows in Dynamics 365/Dataverse.

In the example, we look at how we can change a personal user owner to a service user so that the flow is no longer dependent on a personal user. To avoid errors caused by personal user accounts as owners in business-critical processes.

Step 1: Open an App in Dynamics 365 CE and go to Advanced Find as displayed in the image below.
(Want to know how to add custom icons in the list view as seen in the image below, check out this post, How to add custom icons to a list view in Dynamics 365 CE)

Step 2: When the Advanced Find opens (this can take some time the first time you open it) look for Processes in the dropdown list as shown in the image below.

Step 3: After you selected processes you will get a wall of filters. What I tend to do is to remove them and add new filters for my needs. To remove the filters right click on the small down arrows and select delete.

Step 4: After all the filters are deleted is will look like the image below.

Step 5: Now we need to add filters to retrieve workflows and Power Automate flows where a specific user is an owner.

Find and select the Category field in the dropdown.

Then we need to add the values we want to filter on. In this example, we look at Workflow and Power Automate Flow (Modern Flow). To add the values click on the values and to the array that points toward the field of selected values. This step must be performed for each value you want to include. So in this example two times, one for modern flow and one for workflow.

When the values are selected and included click on the OK button to proceed. If the advanced find query runs now it will list all workflow and power automate flows in the environment. In the next step, we filter on a specific owner of the flows that we want to change.

Step 6: To add the owner select a new field and look for the owner and add it to the filter. Next step we look for the specific user we want to find.

Step 7: To find the user we want we need to change the condition of the filter. In this case we want to find the owner that is equal a specific user. To change the condition procced with the steps below.

Step 8: Now we need to find the user we want to change with another user.

After the dialog opens search for the user we want to find, select and click ok.

Step 9: Now we have added the filter we want and ready to run the query. This is done by clicking the Results button shown in the image below.

Step 10: The query will output the following result. Next step we want to change the owner to a service user. To avoid personal users to be attached to system dependent workflows and Power Automate flows.

Step 11: To change the owner of the flows. Select all of the flows > Click on Assign Processes > Change assign to, to User or team > Find the user, in this case a demo service user > Finish of by clicking Assign. The change may take some time and the result list will become empty since the filter no longer match a result since the user in the query is no longer the owner of the processes.

Step 12: After the processes has changed owner we can go back and edit the owner filter and look for the service user instead. The change results in the following shown in the image below.

This completes the post. Hope you found it valuable.

For More Content See the Latest Posts