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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello Helpers, I have a PBI report with access token embedded within the web connector to the GitHub to retrieve CoPilot Usage statistics.
From the Desktop, it worked flawlessly. However, after publishing to the PBI Web Service and try to refresh from there, it failed with the following messages. Basically, it seems like the GitHub could only accept Token with Anonymous Access, but in PBI Service that is integrated with our on-premise Gateway, this is not allowed, and it allows only OAuth to GitHub, or Basic Authentication with Username/Password.
Thank you for any insights
-------
" Data source errorExpression.Error: The 'Authorization' header is only supported when connecting anonymously. These headers can be used with all authentication types: Accept, Accept-Charset, Accept-Encoding, Accept-Language, Cache-Control, Content-Type, If-Modified-Since, Prefer, Range, Referer. Microsoft.Data.Mashup.ErrorCode = 10348. The exception was raised by the IDbCommand interface. Table: source. "
Solved! Go to Solution.
Hi @SeanBI,
Thank you for reaching out to Microsoft Fabric Community.
The issue here is because of the power bi service security model. Power bi service does not support using custom Authorization headers in Web.Contents() unless the authentication method is set to Anonymous and the data source is marked as anonymous in the data source settings in the service.
The GitHub API is being accessed using a PAT in the authorization header, this works fine in desktop but the service blocks it unless everything is configured for anonymous access and it will not work if a gateway is involved or if other authentication methods like OAuth or Basic are used.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
Hi @SeanBI,
Thank you for reaching out to Microsoft Fabric Community.
The issue here is because of the power bi service security model. Power bi service does not support using custom Authorization headers in Web.Contents() unless the authentication method is set to Anonymous and the data source is marked as anonymous in the data source settings in the service.
The GitHub API is being accessed using a PAT in the authorization header, this works fine in desktop but the service blocks it unless everything is configured for anonymous access and it will not work if a gateway is involved or if other authentication methods like OAuth or Basic are used.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
Hi @SeanBI,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance.
If my response addressed, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Thanks and regards,
Anjan Kumar Chippa
Hi @SeanBI,
We wanted to kindly follow up to check if the solution I have provided for the issue worked.
If my response addressed, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Thanks and regards,
Anjan Kumar Chippa
Hi @SeanBI,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked.
If my response addressed, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Thanks and regards,
Anjan Kumar Chippa
Hi, @SeanBI
I think Chris Webb's BI Blog will help you solve this problem:
Chris Webb's BI Blog: Connecting To REST APIs With OAuth2 Authentication In Power Query/Power BI
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!