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! It's time to submit your entry. Live now!
I have a web connection that I'm using for a report, for this connection I have a API Key that I'm using to authorise getting the data.
This works fine in desktop but when I'm publishing I'm not able to authorise myself there.
The PBI documentation says "When uploading the report to the Power BI service, only the anonymous, Windows and basic authentication methods are available."
So I'm wondering if there's any neat tricks I can use to allow me to use this source, and have it published?
Thanks
I've tried adding /get?x-api-key=**** to the end of the URL but that's not getting me any results other than error "Cannot GET"
Solved! Go to Solution.
Hi @Anonymous,
You may try this solution: Edit M query in Advanced Editor and attach your Key there.
Here are some links you may refer to Solved: Refreshing a web source with an API Key and a dyna... - Microsoft Power BI Community and Solved: API authentication error on scheduled refresh! - Microsoft Power BI Community.
Or you can use Basic authorization with the ApiKeyName and ApiKey. For more details, you can refer to Solved: A web API key can only be specified when a web API... - Microsoft Power BI Community.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi @Anonymous,
You may try this solution: Edit M query in Advanced Editor and attach your Key there.
Here are some links you may refer to Solved: Refreshing a web source with an API Key and a dyna... - Microsoft Power BI Community and Solved: API authentication error on scheduled refresh! - Microsoft Power BI Community.
Or you can use Basic authorization with the ApiKeyName and ApiKey. For more details, you can refer to Solved: A web API key can only be specified when a web API... - Microsoft Power BI Community.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Thanks for the reply!
Unfortunately "Basic" auth doesn't work. I get an error saying "The credentials provided for the Web source are invalid", even tough when used as header they work.
I tried the suggested way you linked, with using advanced editor etc.
This worked fine in desktop, like before. But when publishing I still can't authenticate
The Power BI Data Visualization World Championships is back! It's time to submit your entry.