[DataSource.Error] SharePoint /_api/contextinfo
FYI, I was asked privately for some more details on the problem/solution. I'm pasting it here in case it were to help anyone else. Regards
If you have a query that pulls information from several XLS files in a SharePoint folder, each one of these import steps requires a SharePoint API call. However... the fundamental problem for me... if you have another query that references this initial query, Power BI desktop will repeat the entire process of SP API calls again instead of just passing on the existing data.
For example, if my initial query had 100 API calls, and I referenced it twice in Power Query... I would end up with 300 API calls. For my particular problem it was in the 1,000s, because I was importing many different XLS tables from many XLS forms and then manipulating the data with several queries in Power Query. Using fiddler eventually opened my eyes as to how many calls were actually happening.
I solved it two different ways for two different projects. Both of them are just trying to prevent the repeated API calls (i.e. the extra 200 in my example above).
#1 Dataflow - One workspace I have allows dataflows. This was a pretty easy fix because you can literally just copy/paste over the m-code. So I just made a dataflow for the initial import queries. Then in my project, I just replaced the original import queries with the dataflow output. This prevented the subsequent queries from triggering a repeat of the API calls again.
#2 Move to DAX - another workspace I had did not allow data flows. This was a bit more work, however it worked in the end. Instead of manipulating the data in Power Query, I rewrote the these queries in DAX. It was a bit of a pain because some things are very difficult to replicate in DAX that is easy with M-code. By moving these to DAX, it also prevented the triggering of repeating the API calls again.