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

programmatic data refresh using api

$
0
0

I have found that with the new PBI API there is an option to trigger a dataset refresh programatically.  I was looking at implementing this into a powershell script that could be called at the end of our nightly job loads.  I found a open source powershell script that uses the API: https://github.com/Azure-Samples/powerbi-powershell

 

I filled in the script with the info needed and it works.  However when i run the script I am forced to manually sign in via AAD to generate the required token used in the API call.  The plan is to run this powershell script in a job automatically so I would need the login to be handled automatically.

 

How can I make the login automatic so that I do not need to manually log in each time i run this script?

 

Without knowing much about powershell scripting I'm assuming that the following code needs to be changed:

       $authResult = $authContext.AcquireToken($resourceAppIdURI, $clientId, $redirectUri, "Auto")

Rather than passing in "Auto", I would assume that there is some way to pass in user credentials instead.

 

Any help would be appreciated.

 

Thanks!


Viewing all articles
Browse latest Browse all 18036

Trending Articles



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