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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
jaryszek
Resident Rockstar
Resident Rockstar

Web api connection source with gitHub using Oath2 authentication

Hi Guys,

I am using Basic authentication to get into my repositories using web content query. 
It is working with my organization name and my PAT token which i generated. 

But how to share this report to another users? 

If i will share it they will be using my PAT token as credential so it means no security at all. 
They should run my power bi report without any prompt to make the authentification but this is not a good solution.

How to make outh2 with power bi connector? It is possible? 
Or do you know another way of safe connection to github via web connector? 

best,
Jacek

1 ACCEPTED SOLUTION
v-echaithra
Community Support
Community Support

Hi @jaryszek ,

If want to connect from Power BI to a REST API that uses OAuth2 authentication then you need to build a custom connector as the Power BI's standard Web connector doesn’t directly support OAuth2 authentication.. You can find documentation on how to implement an OAuth2 flow in a custom connector here: Handling authentication for Power Query connectors - Power Query | Microsoft Learn
A custom connector allows you to implement OAuth2 flow with GitHub API, and you can manage the authentication for each user separately.
If you use a custom connector in the Power BI Service then you’ll need to use an on-premises gateway.
The only exception is that you can connect to some APIs that use AAD authentication using the built-in web or OData connectors, as documented here Authentication in desktop apps - Power Query | Microsoft Learn.

Reference: https://learn.microsoft.com/en-us/power-query/handling-authentication
Develop a connector using the Power Query SDK - Power Query | Microsoft Learn

Thank you.

View solution in original post

3 REPLIES 3
v-echaithra
Community Support
Community Support

Hi @jaryszek ,

This guide details the steps to connect Power BI to a GitHub repository, including setting up OAuth2 authentication.
Tutorial: Connect to a GitHub repo with Power BI - Power BI | Microsoft Learn

Regards,
Chaithra E.


v-echaithra
Community Support
Community Support

Hi @jaryszek ,

If want to connect from Power BI to a REST API that uses OAuth2 authentication then you need to build a custom connector as the Power BI's standard Web connector doesn’t directly support OAuth2 authentication.. You can find documentation on how to implement an OAuth2 flow in a custom connector here: Handling authentication for Power Query connectors - Power Query | Microsoft Learn
A custom connector allows you to implement OAuth2 flow with GitHub API, and you can manage the authentication for each user separately.
If you use a custom connector in the Power BI Service then you’ll need to use an on-premises gateway.
The only exception is that you can connect to some APIs that use AAD authentication using the built-in web or OData connectors, as documented here Authentication in desktop apps - Power Query | Microsoft Learn.

Reference: https://learn.microsoft.com/en-us/power-query/handling-authentication
Develop a connector using the Power Query SDK - Power Query | Microsoft Learn

Thank you.

Thank you. 

I need a quidance step by step how to create oath2 via github authentification connector from power bi and github side. 

Best,
Jacek

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Kudoed Authors