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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
tobias29
Frequent Visitor

Authentication and Query issues - cannot authenticate, queries hang

I have a report that's been causing me issues for weeks. It's massive and has lots of queries with fairly complex operations, so always takes hours to work on.  I'm trying to publish a fix in one of the queries due to the data source changing format.

 

When I apply the change, I get 'We couldn't authenticate with the credentials provide' on one of my organization's SharePoint sites  Here's an example of how the queries connect to SharePoint:


Source = SharePoint.Files("https://company.sharepoint.com/teams/myteam", [ApiVersion = 15]),
#"Filtered Rows" = Table.SelectRows(Source, each ([Folder Path] = "https://company.sharepoint.com/teams/myteam/Shared   Documents/the/desired/folder/")),

 

- I have tried changing the setting in Security to use my default browser for authentication. The authentication popup hangs for a while, disppears, giving me hope that it's worked, then pops up a while later saying the same error.

- I have tried to apply the permissions at the team level as opposed to the root level. Same issue.

- I have tried to clear global permissions, but then the authentication popup hangs whilst trying to connect using my credentials - this is weird.

- I have downloaded the pbix file and started from fresh to see if the change (changing remove columns to select columns) was causing issues - same issue.

 

Note: Nothing changed, I'm not aware of anything that would have caused this to happen.

 

This is really frustrating me. Any help would be appreciated.

1 ACCEPTED SOLUTION
Mauro89
Super User
Super User

Hi @tobias29

have you tried to start with a new report and a blank query to isolate the issue. By this you can check if the issue is on the Sharepoint Auth itself or not. From there you can dig deeper in troubleshooting.

 

Possible next checks:

 

  • Clear Power BI Desktop credential cache: File → Options → Data source settings → Clear all cached credentials, then restart Desktop
  • Use Organizational account authentication instead of Windows credentials when the prompt appears
  • Try authenticating with anonymous first, then switch back to organizational (forces credential refresh)
  • Sign out and sign back into Power BI Desktop completely
  • Check if corporate VPN or firewall settings changed (blocking OAuth endpoints)
  • Try from a different network (home WiFi vs office network)

     

     

Best regards!

PS: If you find this post helpful consider leaving kudos or mark it as solution

View solution in original post

3 REPLIES 3
v-dineshya
Community Support
Community Support

Hi @tobias29 ,

Thank you for reaching out to the Microsoft Community Forum.

 

Hi @Mauro89 , Thank you for your prompt response.

 

Hi @tobias29 , In addition to @Mauro89  response, i have added some points.

 

1. Switch to system browser auth: In File --> Options and settings --> Options --> Security, check Use my default web browser. If it’s already checked and you use Edge, temporarily set Chrome or vice‑versa as your OS default browser and retry.

2. Re‑connect using the SharePoint connector:
Get Data --> SharePoint Folder --> Site URL = https://company.sharepoint.com/teams/myteam --> Connect --> Organizational account --> Sign in and apply at the organizational/site level.

3. Please try below M code.

let
SiteUrl = "https://company.sharepoint.com/teams/myteam",
Source = SharePoint.Files(SiteUrl, [ApiVersion = "Auto"]),
Folder = "https://company.sharepoint.com/teams/myteam/Shared Documents/the/desired/folder/",
Filtered= Table.SelectRows(Source, each Text.StartsWith([Folder Path], Folder)),
// keep only required columns to reduce payload
Kept = Table.SelectColumns(Filtered, {"Folder Path","Name","Content"})
in
Kept

4. Target a single file via SharePoint.Contents:

let
SiteUrl = "https://company.sharepoint.com/teams/myteam/",
FilePath = "Shared Documents/the/desired/folder/YourFile.xlsx",
FileBin = SharePoint.Contents(SiteUrl){[Name="YourFile.xlsx", FolderPath=SiteUrl & "Shared Documents/the/desired/folder/"]}[Content],
Excel = Excel.Workbook(FileBin, null, true)
in
Excel

 

I hope this information helps. Please do let us know if you have any further queries.

 

Regards,

Dinesh

Hi @tobias29 ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

 

Regards,

Dinesh

Mauro89
Super User
Super User

Hi @tobias29

have you tried to start with a new report and a blank query to isolate the issue. By this you can check if the issue is on the Sharepoint Auth itself or not. From there you can dig deeper in troubleshooting.

 

Possible next checks:

 

  • Clear Power BI Desktop credential cache: File → Options → Data source settings → Clear all cached credentials, then restart Desktop
  • Use Organizational account authentication instead of Windows credentials when the prompt appears
  • Try authenticating with anonymous first, then switch back to organizational (forces credential refresh)
  • Sign out and sign back into Power BI Desktop completely
  • Check if corporate VPN or firewall settings changed (blocking OAuth endpoints)
  • Try from a different network (home WiFi vs office network)

     

     

Best regards!

PS: If you find this post helpful consider leaving kudos or mark it as solution

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.