Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
In Desktop version I am using Function to get token and pass it to actual json API queries (10+), but Function feels like doesn't work for API resfresh when I publish data to Power Bi, how can I get data for several queries without Function?
Curently I embed login & pass into each query header & I am getting error on refresh.
In my case token is valid for 15 min, every time I call I am getting new token.
Last refresh failed: Thu May 19 2016 08:15:15 GMT-0800 (Alaskan Daylight Time)
Can't connect to the data source.Hide details
Data source type:
Data source error: The credentials provided for the Web source are invalid. (Source at https://api.linkgoeshere.com/reportnamegoeshere.)
Cluster URI: WABI-WEST-US-redirect.analysis.windows.net
Activity ID: 9cf81dee-f58c-4fac-aa54-dbb269d0ee85
Request ID: ad596f2c-9efb-032a-e15d-90822eb6351b
Time: 2016-05-19 16:15:15Z
Solved! Go to Solution.
Problem is solved by edit time delay between queries.
I am using this query type for each report, so I could have 10+ queries for one data set.
let
authKey = "{""Username"":""USERNAME"",""Password"":""PASSWORDGOESHERE"",""LocationID"":""LOCATIONIFNEEDED""}",
url = "https://APILINKGOESHERE.com",
// Uses the authentication/token method to obtain a token
GetJson = Web.Contents(url,
[
Headers = [#"Content-Type"="application/json"],
Content = Text.ToBinary(authKey),
RelativePath="/Authentication/AuthorizeUser"
]
)
in
GetJson
Problem is solved by edit time delay between queries.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 7 | |
| 6 |