Forum Discussion
Robinator
7 years agoFrequent Visitor
How to refresh Datasets with PowerBI REST API - executed in Azure Data Factory Pipeline
Hi, I've built multiple pipelines in Azure data factory and a few Power BI reports (https://app.powerbi.com) that use data from those pipelines. My ultimate goal is to be able to refresh a Power ...
Robinator
7 years agoFrequent Visitor
Gonna try this solution. Magic search word = Postman
- Robinator7 years agoFrequent Visitor
yaay, some small progress
- Robinator7 years agoFrequent Visitor
another step forward, not sure how i get this token into a new API post
- Robinator7 years agoFrequent Visitor
gonna try creating a powershell script and run that script in ADF using a webhook,
special thanks to https://blog.gbrueckl.at/2017/08/refresh-powerbi-datasets-powershell-azure-runbooks/
https://stackoverflow.com/questions/52697381/power-bi-dataset-refresh-using-powershell
- Robinator7 years agoFrequent VisitorUsed the following as Powershell script, and it worked :cathappy:$body = @{"client_id" = "bf..........";"grant_type" = "password";"username" = ".......@.........";"password" = ".............";"scope" = "openid"}$authResponse = Invoke-RestMethod -Uri $authUrl –Method POST -Body $body$headers = @{"Content-Type" = "application/json";"Authorization" = $authResponse.token_type + " " +$authResponse.access_token}$restResponse = Invoke-RestMethod -Uri $restURL –Method GET -Headers $headers$datasetId = "ab5d......."$groupId = "ecb5......"$body = @{"notifyOption"= "MailOnFailure"}$restResponse = Invoke-RestMethod -Uri $restUrl –Method POST -Headers $headers -Body $body