Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Team,
I have come across this very strange problem where the ''Authorization' parameter in Web.Contents will fail authentication if using a variable (Shown below with variable token from another query).
I generate in Query 1 the bearer token required for authentication in Query 2, however when passing it into Query 2 the authentication fails.
Query1
generate_token= "Bearer XXXX"
Query2
the_access_token = generate_token
Source = Json.Document(Web.Contents("https://ABC.com", [RelativePath = "XYZ", Headers = [Authorization=the_access_token ]]))
However, running the below with the exact same string except not in parameter form works fine.
Source = Json.Document(Web.Contents("https://ABC.com", [RelativePath = "/XYZ/", Headers = [Authorization="Bearer XXXX"]]))
Any ideas on why this may be?? There are no difference between these two strings.
Hi @asherbowden ,
Please refer to the following post, it doesn't seem to work using parameter in headers.
Solved: How to specify HTTP request header parameter in Po... - Microsoft Power BI Community
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
13 | |
8 | |
8 | |
7 |
User | Count |
---|---|
17 | |
13 | |
7 | |
6 | |
6 |