Access to Data Service with Power Bi

Hi,

following the screenshot from PowerBi:

I have tried both variants (confidential application and non-confidential application).

With Postman both work
I suspect this is due to the “Redirect URL” .
Without “redirect Url” it probably only works with a Confidential application, but I can not select an application Scope

Thanks in advance

1 Like

Hey @Benjamin_Wurth

Please try removing comma between scope values in the request body.

Thanks
#nK

Hi,
I have just done this

unfortunately still the same error:
DataSource.Error: The downloaded data is HTML. This is not the expected type. The URL may be incorrect, or you may not have specified the correct credentials for the server.

Best regards

1 Like

Hey @Benjamin_Wurth

Sorry my bad why this scope is being passed here

Did you choose data service app in the external app creation

Thanks
#nK

I’m glad about any new idea :slight_smile:

yes, I did. Only not with application scope, there it does not work somehow (see post above)

1 Like

Yes data services need user scope only and I guess the way to authenticate differs.

Thanks
#nK

Do you have any other ideas what it could be?

Thanks in advance

1 Like

I tried doing something similar not too long ago and I really battled to auth with Power BI. I managed to auth successfully using Postman but the callback URL was a postman URL. I got stuck trying to find the right callback URL for Power BI, thinking that might be the issue.

1 Like

Hey @Benjamin_Wurth

I will prepare a short demo on this soon.

Thanks
#nK

1 Like

Hey @Benjamin_Wurth

But one thing, you said you can successfully connect using Postman right ?

Thanks
#nK

yes, it works with Postman

Thank you very much

1 Like

yes, i think so too. so unfortunately you haven’t found a solution yet either?

Hey @Benjamin_Wurth

Could you please share the CURL or the collection over here ?

Thanks
#nK

Hi,

following a screenshot:

Auth URL: UiPath

Access Token URL: https://cloud.uipath.com/identity_/connect/token

Scope: DataService.Data.Read DataService.Schema.Read

Is that good enough for you?

Thanks in advance

1 Like

Hey @Benjamin_Wurth

So this will respond you with access token & you use it for fetching data from data services.

Thanks
#nK

Hi,

Exactly. But in Power Bi I do not get the Access Token back.

Thanks in advance

@Benjamin_Wurth - The issue here is that Data Service only supports User Scopes and thus cannot work with Client credentials grant type. It needs to use either the Authorization code or Authorization code with PKCE grant types - Accessing UiPath resources using external applications

As both those grant types require an interactive mechanism to generate the first refresh token, the approach of directly writing a M query will not work.

You can write a custom connector and use it on your desktop or using the Power BI on-premises gateway. I had played with a sample Power BI customer connector last year. This code should still work if you follow the readme.md file in there.

Power BI - Data Service sample.zip (26.2 KB)

Additionally, we have heard the challenges that interactive sign-in requirement brings to a lot of simple scenarios, and are working on an access token approach as well that should release later this year/early next year.

3 Likes

Hi @ankit.saraf

thank you for the information and the example. I will test it and give feedback

Best regards
Benni

Hi @ankit.saraf ,

wow, that’s really good, thanks :slight_smile:

I was able to load the data into Power Bi Desktop with it.

Thanks a lot!

Benni

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.