Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
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.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |