Quantcast
Channel: Developer topics
Viewing all articles
Browse latest Browse all 18054

How to generate authorization token in R?

$
0
0

Dear community,

 

I'm trying to generate an authorization token to Power BI Service in R. Thanks to Tom Martens there is his experience mentioned in this topic - https://community.powerbi.com/t5/Service/connect-to-Power-BI-Service-using-R/m-p/119697#M18632

 

When I tried, it was unsuccessful. Can somebody help to find out what is wrong in below R script?

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

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

powerbi.app <- oauth_app(
  "myAppName",
  key="my_client_id-value", 
  secret="my_secret_id-value"
)

powerbi.token <- oauth2.0_token(powerbi.urls, powerbi.app,
                                user_params = list(resource = "https://analysis.windows.net/powerbi/api"),
                                use_oob = FALSE)

Regards,

Ruslan

 

 

 


Viewing all articles
Browse latest Browse all 18054

Trending Articles



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