How to use UiPath External Application with Application Scopes, in Power Automate?
First create a new External Application is your UiPath Automation Cloud or On-Premise Orchestrator and assign the required User Scope(s) as described in the below documentation:
- Managing external applications (UiPath Automation Cloud)
- Managing external applications (Orchestrator On-Premise)
The UiPath External Application properties should look like this:
Example: How to use HTTP actions in Power Automate to retrieve your Orchestrator Folders.
Note: The example is for Automation Cloud. For On-Premise Orchestrator the URIs are slightly different. Check Using OAuth For External Apps for more information.
- Go to Power Automate and create a new flow
- Use a HTTP action to generate the access token
The action should look like this:
Note: As a best practice, avoid adding your App ID and App Secret in plain text.
The output of this HTTP action will look as below:
- Use the access token
Add a second HTTP request (in this example we will get the Orchestrator folders)
Note: To extract the access token from the HTTP action that generated it, use the following expressions:
"body('HTTP_-_Generate_Access_Token')['access_token']", where "HTTP_-_Generate_Access_Token" is the name of the previous HTTP action.
The whole flow looks as below:
For all the available API requests in UiPath, check API References.