Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a pretty simple Power BI dataset with 4 queries.
The first query retrieves an access_token from an API:
= () => let
url = "https://api./.../application",
headers = [#"Content-Type" = "application/json"],
postData = Json.FromValue([applicationId = 123, applicationSecret = "123"]),
response = Web.Contents(
url,
[
Headers = headers,
Content = postData
]
),
access_token = Json.Document(response)[accessToken]
in
access_token
The other queries use the dynamically generated access token and retrieve data from the API:
let
Source = Json.Document(Web.Contents("https://api./...", [Headers=[token=GetToken()]])),
# ...
# ...
in
# ...
It all works fine and I can refresh the data if I click "Refresh" in the dataset in the Power BI desktop application.
What I want to do though is to publish the dataset to Power BI service and schedule a refresh.
In order to do so I need to edit the credentials somehow:
What do I need to do here in order to regularily configure a Scheduled Refresh?
Thank you
Update:
If I try and establish the data connection to the Web API without a dynamic token that uses a POST request to get the token for the API, meaning by getting a token value in Python by using the POST request and putting it into the data connection pane:
This works fine after publishing it to Power BI Service and clicking on "Refresh Now" -> No Error.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
106 | |
87 | |
77 | |
69 |
User | Count |
---|---|
124 | |
112 | |
94 | |
84 | |
75 |