Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
SeanBI
Regular Visitor

PBI Web Service Refresh with Access Token to GitHub?

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. "

 

1 ACCEPTED SOLUTION
v-achippa
Community Support
Community Support

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

View solution in original post

5 REPLIES 5
v-achippa
Community Support
Community Support

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

hackcrr
Super User
Super User

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors