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!
Good day,
Technical:
My team and myself are pushing our .pbip files to company GitHub, each saved in its own folder.
Scope:
I want to create a table, which then will be replicated for each report so user can see a changelog.
The changelog should show: commit message | commiter ID | commit date | report name.
Current solution:
I was able to achieve all of it with below code:
Auth: Basic
let
Owner = "git-owner",
Repo = "git-repo",
Branch = "pbi-reports",
BaseUrl = "https://github.contosco.com/api/v3/repos/" & Owner & "/" & Repo & "/commits",
Source = Json.Document(Web.Contents(BaseUrl, [Query = [sha = Branch, per_page = "100"]])),
ToTable = Table.FromRecords(Source),
AddFilesList = Table.AddColumn(ToTable, "Files", each
let
CommitUrl = "https://github.contosco.com/api/v3/repos/" & Owner & "/" & Repo & "/commits/" & [sha],
CommitDetails = Json.Document(Web.Contents(CommitUrl)),
Files = CommitDetails[files]
in
Files
)
Locally, everything is working perfectly.
Issue:
When I upload it to powerbi.com, I receive below error message during refresh:
Data source error{"error":{"code":"DMTS_OAuthFailedToGetResourceIdError","pbi.error":{"code":"DMTS_OAuthFailedToGetResourceIdError","details":[{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage","detail":{"type":1,"value":"Failed to get OAuth resource, please make sure the OAuth is supported"}}],"exceptionCulprit":1}}}
So I have tried to pass PAT within the M code e.g,:
Source = Json.Document(Web.Contents(BaseUrl,
[
Query = [sha = Branch, per_page = "100"],
Headers = [Authorization="Bearer PAT_TOKEN_IS_HERE"]
]))But this failed as well.
Question:
Is there a solution to download all of the data I need without modifying the gateway or putting company data at risk?
I don't remember now what I did but I also received error about dynamic data sources - which was a new error, some progress, but I was not able to resolve it either.
Edit:
I also tried to use beta GitHub connector (PowerBI > Get Data) but I was not able to login since it was asking for credentials and combination of email/login and PAT (instead of password) did not work.
Solved! Go to Solution.
Hii @Copycat
Since you're using GitHub Enterprise with SSO, the Power BI GitHub connector will not work it only supports public github.com using GitHub’s own OAuth app. Enterprise SSO logins, enterprise domains (github.company.com), and PAT-based auth are not supported in the connector, so your use case cannot refresh in Power BI Service.
The working alternatives is :
Power Automate >> connect to GitHub Enterprise using SSO >> save commits/JSON to SharePoint/Blob >. Power BI refreshes from there.
Hi @Copycat
Thank you for reaching out to the Microsoft Fabric Forum Community.
@rohit1991 Thanks for the inputs.
I hope the information provided by user was helpful. If you still have questions, please don't hesitate to reach out to the community.
Hi @Copycat
Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.
Hii @Copycat
Your M code works locally but cannot refresh in Power BI Service because GitHub REST API requires OAuth, and Power BI Service only supports that through the GitHub connector, not custom M.
To fix:
Use the GitHub connector
or
Use Power Automate / Azure automation to store the data first
How can I use GitHub connector?
When I select it via Get Data -> GitHub, I provide 'owner' and 'repo name' it opens browser and asks me to log in.
As I mention before I have tried below combinations (login | password):
company_email | PAT
company_id | PAT
PAT | no password required
My PAT setup is: admin:org, repo, user, workflow
Hii @Copycat
You can connect using below steps :
There is no need of PAT or Password.
I may forgot to include this information.
I'm using GitHub Enterprise not personal GH (github.company_name.com). That means I do not have password for my github account since I need to log in via SSO.
After reading a bit, I found that this PowerBI connector won't work for my usecase - because of above.
Still looking for a different way to do it. Does anyone got any ideas how to achieve it?
Hii @Copycat
Since you're using GitHub Enterprise with SSO, the Power BI GitHub connector will not work it only supports public github.com using GitHub’s own OAuth app. Enterprise SSO logins, enterprise domains (github.company.com), and PAT-based auth are not supported in the connector, so your use case cannot refresh in Power BI Service.
The working alternatives is :
Power Automate >> connect to GitHub Enterprise using SSO >> save commits/JSON to SharePoint/Blob >. Power BI refreshes from there.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 49 | |
| 30 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 128 | |
| 102 | |
| 57 | |
| 39 | |
| 31 |