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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How do you use the same credentials for multiple web sources on the same sharepoint server/site?

I'm having a problem that leads to extreme overhead setting login credentials for web sources.

 

I have a corporate sharepoint with multiple csv files exported under one common root:

 

https://mycompanyname.sharepoint.com/sites/ProjectX/Shared%20Documents/data_exports/

 

i.e.

https://mycompanyname.sharepoint.com/sites/ProjectX/Shared%20Documents/data_exports/categoryA/latest...

https://mycompanyname.sharepoint.com/sites/ProjectX/Shared%20Documents/data_exports/categoryB/latest...

 

I then have a pbix file with multiple with a 'root location' query:

 

ExportFolder = "https://mycompanyname.sharepoint.com/sites/ProjectX/Shared%20Documents/data_exports/"

 

And multiple queries starting with:

 

= Csv.Document(Web.Contents(ExportFolder & "categoryA/latest/foo.csv"),[Delimiter=",", Columns=37, Encoding=65001, QuoteStyle=QuoteStyle.Csv])

 

This all works fine, but in data sources I have one entry per csv instead of one for 'mycompanyname.sharepoint.com'.  This means I have to click through each and do the oath login.  I then have to do that again in powerbi online to say setup a scheduled refresh.  If someone else loads the power bi, they have to go through and set the credentials for all.  As the amount of sources increases this becomes tedious. 

 

I'm sure this isn't how it's meant to be and I've got something basic wrong.

 

I did try setting the 'global permissions' for the 'https://mycompanyname.sharepoint.com' entry, but it doesn't seem to work, I get errors in a refresh for each query until I go into 'permissions for the current file' and set every single fine individually.

 

Before I went with the 'web source' method I tried the sharepoint connector but couldn't get it to work for me - I think it expects everything in a flat sharepoint library or something - it just offered me a huge list of files that didn't seem to include the ones I expected.

2 REPLIES 2
Anonymous
Not applicable

Hi  @Anonymous ,

When specifying credentials for a SharePoint site, you can enter any OAuth credentials, and you can specify whether it is for a specific site or all sites in the root path

v-yangliu-msft_0-1606985791156.png

 

There are also related links for your reference:

https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-sharepoint-online-list

https://community.powerbi.com/t5/Service/Web-Source-Credentials/m-p/810104

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi thanks for replying, 

 

Can you confirm you're talking about the web source connector?  

I don't see anything about specifying the a site or root site except:

 

power bi permissions.png

Here you can see top right there is an entry for all of my company sharepoint, I tried setting the oauth position there, but I would still get individual files fail until i went and did their oauth individually.  

 

What I'm saying is that I would expect to only have to set ouath for that one top right entry and then the rest would just work. 

What is the login in how power bi tries login? Does it first try the specific one then fall back to the generic one? 

Does it just try the most specific one and I need to manually go in and delete all the specific ones to force the generic one to be used?

Is there an alternate method I should be using for accessing a range of files in different locations in a sharepoint?

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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