Connect Power BI Desktop to orchestrator

Hey there!

I’m trying to connect Power BI with Orchestrator Cloud through an API, but I’m always getting an error saying: DataSource.Error: The downloaded data is HTML, which isn’t the expected type. The URL may be wrong or you might not have provided the right credentials to the server. OR We couldn’t authenticate with the provided credentials.

Here is what I did step by step:

  1. Created a new query called BaseUrl, then typed in it :

let
Source = “UiPath Orchestrator
in
Source

BaseURL

  1. Created another query called Credentials, to store the user credentials:

[
grant_type = “refresh_token”,
client_id = " ******* ",
refresh_token = " ********** "
]

Credential

  1. Created another query then typed in it:

let
Path = “/odata/Assets”,

Auth = Json.Document(Web.Contents(BaseUrl, [Headers=[#"Content-Type"="application/json"], 
Content=Json.FromValue(Credentials), RelativePath="/api/account/authenticate"])),
Token = Auth[result],

Source = Json.Document(Web.Contents(BaseUrl, [Headers=[Accept="application/json", 
#"Authorization"="Bearer " & Token], RelativePath=Path]))

in
Source

ERROR:

Appreciate any help, thanks in advance

@Tarek_Kariish The URL for authentication should be https://account.uipath.com/oauth/token instead of https://cloud.uipath.com/org/api/account/authenticate. Refer Orchestrator - Consuming Cloud API (uipath.com)

As for subsequent URL queries e.g. to fetch assets, the base URL should be https://cloud.uipath.com/orgname/tenantname/orchestrator_, instead of just https://cloud.uipath.com/orgname. Then the relative path /odata/Assets would be appended to the base url ending with orchestrator_

Im getting following error when i try to connect to AC Orchestrator

Does anybody know how i can solve the problem ?