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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
skasper
Responsive Resident
Responsive Resident

DataSource.Error: SharePoint: Request failed

Hi,

 

I am using Power BI Desktop and trying to query data from an Excel file stored on a SharePoint Online site. 

 

Query

let
    Source = Excel.Workbook(Web.Contents("https://xxx.sharepoint.com/sites/management/Freigegebene%20Dokumente/salaries.xlsx"), null, true),
    tbl_salaries_Table = Source{[Item="tbl_salaries",Kind="Table"]}[Data],
    #"Changed Type" = Table.TransformColumnTypes(tbl_salaries_Table,{{"Name", type text}, {"Net Salary", type number}, {"Total Cost", type number}, {"Hours/Day", Int64.Type}, {"Latest Adjustment", type date}, {"Adjustment Value", Int64.Type}, {"Net Bonus", Int64.Type}, {"Total Bonus Cost", Int64.Type}, {"Bonus Type", type text}})
in
    #"Changed Type"

Error

DataSource.Error: SharePoint: Request failed: https://xxx.sharepoint.com/sites/management/Freigegebene Dokumente/salaries_xlsx/_api/contextinfo
Details:
    DataSourceKind=SharePoint
    DataSourcePath=https://xxx.sharepoint.com/sites/management/Freigegebene%20Dokumente/salaries_xlsx/_api/contextinfo
    SPRequestGuid=ef84049e-601e-4000-ef17-0555bf13666b

 

 

Any idea, what I am doing wrong here?

Thank you.

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.
1 ACCEPTED SOLUTION
v-sihou-msft
Employee
Employee

@skasper

 

I haven't reproduced your issue. Please delete the data source (File->Options and Settings->Data Source Settings->Clear Permission) and reconnect to see if it works.

 

Regards,

View solution in original post

8 REPLIES 8
Carl1985
Helper I
Helper I

Hello everybody, I get the same error in excel when I want to refresh data via power query. 

 

Interestingly, the data nevertheless is refreshed what can be seen in the tab on the right side of excel.  (see screenshot below)

My problem is an other one: When refresh of data is finish excel shutsdown and after restart of excel I get an information the excel file has to be repaired. But reparaiton of the excel file is not possible. 

 

This problem occures since I added some steps in my M-Code. When I'm refreshing data in power query itself, i also can see the refreshed data. 

When I'm deleting this last rows of my M code in power query I don't get a mistake and everthing is fine. 

 

#"Zusammenführte Abfragen1" = Table.NestedJoin(#"Umbenannte Spalten1",{"sfc-Auftragsnummer intern", "Arbeitsgangnr."},#"BelegungFertigung-ZusammenfassungVorgängerFertig",{"Auftrag ", "Arbeitsgangnr."},"BelegungFertigung-ZusammenfassungVorgängerFertig",JoinKind.LeftOuter),
#"Erweiterte BelegungFertigung-ZusammenfassungVorgängerFertig" = Table.ExpandTableColumn(#"Zusammenführte Abfragen1", "BelegungFertigung-ZusammenfassungVorgängerFertig", {"Arbeitsgang startklar"}, {"Arbeitsgang startklar"}),
#"Zusammenführte Abfragen2" = Table.NestedJoin(#"Erweiterte BelegungFertigung-ZusammenfassungVorgängerFertig",{"sfc-Auftragsnummer intern"},#"BelegungFertigung-ZusammenfassungFertigungLetzterFertigerArbeitsgang",{"Auftrag "},"BelegungFertigung-ZusammenfassungFertigungLetzterFertigerArbeitsgang",JoinKind.LeftOuter),
#"Erweiterte BelegungFertigung-ZusammenfassungFertigungLetzterFertigerArbeitsgang" = Table.ExpandTableColumn(#"Zusammenführte Abfragen2", "BelegungFertigung-ZusammenfassungFertigungLetzterFertigerArbeitsgang", {"fertiggemeldeter Arbeitsgang"}, {"fertiggemeldeter Arbeitsgang"}),
#"Umbenannte Spalten2" = Table.RenameColumns(#"Erweiterte BelegungFertigung-ZusammenfassungFertigungLetzterFertigerArbeitsgang",{{"fertiggemeldeter Arbeitsgang", "letzter fertiggemeldeter Arbeitsgang"}}),
#"Neu angeordnete Spalten2" = Table.ReorderColumns(#"Umbenannte Spalten2",{"Arbeitsgang startklar", "letzter fertiggemeldeter Arbeitsgang", "machbarer Start", "machbares Ende", "VK-Auftragsnr.", "VK-Auftragspostionsnr.", "sfc-Auftragsnummer intern", "Artikelnummer", "Artikelbezeichnung", "Arbeitsgangnr.", "Abteilung", "Abteilungsbezeichnung", "Maschinennr", "Maschinenbezeichnung", "restl. Produktionszeit", "Wunsch-Start", "Wunsch-Ende", "AG fertig", "Kurzhinweis für Anzeige", "VK - Preislistenbezeichnung", "VK-Auftragsdatum", "VK-Liefertmin angepasst", "VK-Liefertmin machbar", "Lieferdatum EK-Teil", "Bestätigung Liefertermin EK-Teil", "Arbeitsgang fertig ", "machbarer Termin 1er Sfc-Auftrag", "Auftrag im Rückstand", "Abteilungsgruppe", "Anzahl VK-Aufräge / sfc-Auftrag"}),
#"Gefilterte Zeilen2" = Table.SelectRows(#"Neu angeordnete Spalten2", each ([AG fertig] = "Nein"))
in
#"Gefilterte Zeilen2"

 

 

Carl1985_0-1672944813133.png

 

Maybe somone in the forum could help me???

 

Thx in advance. 

nmasimore
Helper I
Helper I

I tried re-refreshing a couple times, and my issue went away.

If anyone knows why this is, an explanation would be super helpful. Thanks!

Anonymous
Not applicable

Note that I got the same error after my SharePoint files were moved to a U.S. server (had been housed on a server in Europe). This is likely not applicable in many cases, but posted here in case your company does the same and you're spending time trying to figure out what happened. I needed to update the settings for the data source to show the new path.
mugdhadesai
Regular Visitor

Hi,

 

I was doing the same and was getting exactly the same error.

But just now I updated Power BI Desktop to the latest July version, and it is working fine now.

Get Data > Sharepoint folder used to work before, but no longer works now.

So now I use Get Data > Web > give path of the excel file (with only name of sharepoint site > folder > subfolder > file name.xlsx)

No other symbols/code.

 

Thanks

Mugdha

v-sihou-msft
Employee
Employee

@skasper

 

I haven't reproduced your issue. Please delete the data source (File->Options and Settings->Data Source Settings->Clear Permission) and reconnect to see if it works.

 

Regards,

I had the same problem. This solution also worked for me.

Hi,

I also run into similar errors while refreshing the data in Power BI Desktop. In my case as well, the data is fetched from excel files stored in SharePoint Online site. I typically get the same error as stated by @skasper :
DataSource.Error: SharePoint: Request failed

 

On trying the solution you mention, the data refreshment was successful and error-free.

 

However, sometimes while refreshing the dataset, I see other kinds of errors on the SharePoint Site itself indicating the unavailability of it:

aanchalvazir_2-1626792249543.png

On similar lines, I sometimes also encounter the following error while refreshing the dataset in Power BI Desktop:

aanchalvazir_3-1626792344316.png

While investigating these new errors, I read the following documentation on throttling in SharePoint:

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-avoid-getting-throttled-o...

 

How can these repititive errors be overcome? Do you recommend anything specific when it comes to using a specific Microsoft 365 license when dealing with data file retrieval from SharePoint?

 

Thanking you in advance! 🙂

Hi @v-sihou-msft,

 

thank you. I did that and it works now. I also updated to the July version, so I am not sure, what really was the fix.

Best - Sascha
Please always mark accepted solutions. It helps others with similar questions or problems. Thank you.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors