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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Advocate II
Advocate II

SharePoint/OneDrive Query Issue: "Invalid credentials" on Service but ok on Desktop

Hi all,


Hoping someone might have some insight or recommendations for our issue. Details below, please help.


We have a recent issue where the dataflows/reports in PBI Service that query data from folders of Excel files on OneDrive/SharePoint are returning errors of "invalid credentials."  


In PBI Serivce, the query can access the source folder and bring in the file records (first 3 steps in image below). 

Capture error 2.PNG


The issue occurs in the 4th step when the query tries to navigate to the specific file. We get the error in the yellow box and then try to "Configure Connection".

Capture error.PNG


The credentials show as anonymous and when we change it to Microsoft Account and OAuth, the error persists. Notably, the Sharepoint address shown in the msg box is not at the folder level, rather, it references the file from the navigation step. (Duno if that is correct or relevant to the issue.)

Capture error 4.PNG


If we copy and paste the exact same query into PBI Desktop, the query returns the Excel file without issue.

Capture error 3.PNG


Thing we've tried:

1. Tried to refresh other reports/dataflows that query other ODB/Sharepoint folders, not just the one shown here, issue persists.

2. Tried to change owner of the dataflow to other colleagues and have them input their credentials and refresh. Issue persists.

3. Tried to create a completely new dataflow and query sharepoint folders and encounter same issue.


Any help is appreciated. Thanks!

Helper III
Helper III








Helper III
Helper III





Helper III
Helper III

Hello @Doodle ,

I have same issue from two weeks. Is you problem solved? 

Can you please share with me the solution in brief please?

Super User
Super User

Use OAuth

Use API 14 instead of 15

Use Sharepoint.Contents() instead of Sharepoint.Files()


Hello @lbendlin ,

If I change api and replace sharepoint.contents(). I received below error.



Clear permissions and reauthenticate.

Thank you very much for quick reply @lbendlin . I sgined out andssigned in back. Do you mean that? If not could you please tell me how to clear permissions in dataflow . I donot see any option here besides to cancel and go back to initial page.

there are a couple of ways to do that but starting over is the fastest, unfortunately.


Is this on-premise sharepoint or sharepoint online?

@lbendlin ,

Its online Sharepoint. 

I tried to create new dataflow and updated API and sharepoint.files(). But I do not see table. there was no change. So I addded Imported csv step in script. 


Now it show this error.



@lbendlin ,

This is the step I am struck.



The screenshot is blurry.

Helpful resources

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.


Power BI Monthly Update - May 2024

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


Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors