{"id":9572,"date":"2023-01-30T12:00:13","date_gmt":"2023-01-30T20:00:13","guid":{"rendered":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/manage-your-power-automate-desktop-flows-using-web-apis\/"},"modified":"2023-01-30T12:00:13","modified_gmt":"2023-01-30T20:00:13","slug":"manage-your-power-automate-desktop-flows-using-web-apis","status":"publish","type":"power-automate","link":"https:\/\/www.microsoft.com\/en-us\/power-platform\/blog\/power-automate\/manage-your-power-automate-desktop-flows-using-web-apis\/","title":{"rendered":"Manage your Power Automate Desktop flows using Web APIs"},"content":{"rendered":"
Microsoft Power Automate makes it easy to build automations and provides a single, unified experience to manage, monitor and administer the Power Automate Flows. Power Automate portal (make.powerautomate.com) is the default way to manage Power Automate flows such as Cloud Flows and Desktop Flows.<\/p>\n
With the introduction of Web APIs, you can manage desktop flows without the need of using UI – allowing administrators and Automation Center of Excellence teams to manage at scale.<\/p>\n
In this post, we will walk through how you can use the Web API capabilities of Power Automate to manage the Power Automate Desktop flows.<\/p>\n
Before we dive into the Web APIs, here we will explain the existing capabilities that you can use via UI.<\/p>\n
Ad hoc initiation of Cloud flows can be achieved by using the Run <\/strong>action on the top ribbon as shown below \u2013<\/p>\n <\/p>\n By navigating to the Monitor<\/em><\/strong> section of the Power Automate portal, cloud flow run activity, desktop flow runs, and desktop flow queue activity can be accessed.<\/p>\n <\/p>\n \u00a0<\/p>\n Until recently, you had to go to these setup pages and views to access key information like Desktop flow queues etc. To streamline and optimize the management of Power Automate Desktop flows, additional capabilities were added to the Power Automate Web API.<\/p>\n For more details, refer: <\/em>Work with desktop flows using code<\/a><\/p>\n Below is the list of Desktop Flows related actions enabled by the Power Automate Web API<\/p>\n In order to explore these API actions, the first step is to gather details for setting up the authentication with Dataverse.<\/p>\n For more details, refer: <\/em>Use OAuth authentication with Microsoft Dataverse<\/em><\/a><\/p>\n For this walkthrough we will use Postman and connect to the web APIs with OAuth authentication. To do so, you need to register the application in Azure AD tenant. Follow the instructions listed in the tutorial:\u00a0Register an app with Azure Active Directory<\/a>\u00a0on how to create application registration for Dataverse.<\/p>\n For more details on using Postman, refer: <\/em>Use Postman to perform operations with the Web API<\/em><\/a><\/p>\n To gather the Access Token in Postman, gather below information to populate into the Authorization section of the Request.<\/p>\nCloud flow run<\/strong><\/h6>\n
Desktop flow run<\/strong><\/h6>\n
\nFor more details, refer: <\/em>Monitor desktop flow runs<\/em><\/a><\/p>\nDesktop flow queue<\/strong><\/h6>\n
\nFor more details, refer: <\/em>Monitor desktop flow queues<\/em><\/a><\/p>\nHow to use the web APIs to manage your Desktop Flows<\/i><\/h2>\n
\n