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:
- Created a new query called BaseUrl, then typed in it :
let
Source = “UiPath Orchestrator”
in
Source
- Created another query called Credentials, to store the user credentials:
[
grant_type = “refresh_token”,
client_id = " ******* ",
refresh_token = " ********** "
]
- 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