Quantcast
Channel: Service topics
Viewing all articles
Browse latest Browse all 61710

connect to Power BI Service using R

$
0
0

Hey for quite some time I'm trying to connect to the Power BI Servvice using the R package httr. Until now without any success.

 

I'm trying to get an access token for further use ...

 

Currently my R code looks like this

library("httr");
library("httpuv")


powerbi.urls <- oauth_endpoint(
NULL,  
"authorize",  
"token",
base_url = "https://login.windows.net/common/oauth2")

powerbi.app <- oauth_app(
"myAppName",
key="myClientID", 
secret="myClientSecret"
)

powerbi.token <- oauth2.0_token(powerbi.urls, powerbi.app)
powerbi.token

The package httpuv is just used to provide a local web server using port 1410.

 

I used this page

https://dev.powerbi.com/apps?type=web

to create a client-id and a client-secret for a web-app "myAppname".

 

I'm aware of the documentation how to connect to the Power BI Service and also aware of this site

https://www.codeproject.com/tips/1042542/connecting-to-power-bi-rest-api-from-a-service-i-e

 

But I'm not able to translate the C# examples to the proper parameter for the httr functions.

 

I'm able to connect to linkedin and git using httr, but not to the Power BI Service

 

For this reason, any help is much appreciated, even direct comments like

  • This will never work, due to ...
  • Stupid you, just do this ...

Viewing all articles
Browse latest Browse all 61710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>