Quantcast
Channel: Power Query topics
Viewing all articles
Browse latest Browse all 31002

How to refresh using REST API with OAuth2

$
0
0

I created a model in the designer using API data with OAuth2 authentication. To make it a bit user-friendly a created some functions named GetAccessToken(), GetPage(), GetSize() and GetPages(). These functions made it quite userfriendly to make a OAuth2 connection, and of course all the functions was parameterized for re-use in the future

 

Uploaded the model to powerbi.com and could not refresh the dataset, with and error message telling me that I had references to an unsupported datasource. 

 

I did some searches in the Forum and saw that there was some issues with parameterixed functions, so i rewrote the powerquery scripts with all URL's, clientID's etc. hardcoded - I was actually making a script with real bad coding with no possibility for future re-use of common functions

 

Uploaded the model again, the refresh process started so it was accepted as a datasource, but ended with a error message again telling me that the credentials stored in the cloud was missing. I guess the script was not refreshed and the stored access token was no longer valid. 

 

So, my question is - how do I refresh (even refresh now will help), using API datasource with OAuth2 authentication?

 

If this isn't possible in powerBI, I think it should be quite soon. This will make it difficult for me to use PowerBi for analyzing my data. And I'm probably not alone


Viewing all articles
Browse latest Browse all 31002

Trending Articles



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