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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
haythamjawad
New Member

privilege required to use SharePoint.Contents

Hi there,

We have a Power BI file with the data source being a SharePoint site. When I use SharePoint.Files, it works fine with the following formula:
= SharePoint.Files("https://xxxx.sharepoint.com/sites/XXXXX/",[ApiVersion = 15])

 

 

However, when I use SharePoint.Contents, I encounter an authentication problem with the following formula:
= SharePoint.Contents("https://xxxx.sharepoint.com/sites/XXXXX/",[ApiVersion = 15])

haythamjawad_1-1719213853500.png

 

I have read permission on the SharePoint site. Can you help me fix this problem?

3 REPLIES 3
haythamjawad
New Member

Update:

Removing [ApiVersion = 15] from the query made it work. 

= SharePoint.Contents("https://xxxx.sharepoint.com/sites/XXXXX/")

 

Should I change something in the SharePoint permission setting to be able to use [ApiVersion = 15]?

 

Anonymous
Not applicable

Hi @haythamjawad 

You can try the following solutions:

1.Before changing the sharepoint.file to sharepoint.content, clear the data permission at data source settings, then change it to sharepoint.content  reconnect it.

vxinruzhumsft_0-1719281535936.png

 

2.Please check that whether you have the permission of the folder of the sharepoint even through you have the permission of the site, you can refer to the following link.

Share SharePoint files or folders - Microsoft Support

3.change the apiversion to 14

 

SharePoint.Contents("https://xxxx.sharepoint.com/sites/XXXXX/",[ApiVersion = 14])

 

you can refer to the following link.

Solved: SharePoint.Files vs SharePoint.Contents - shared f... - Microsoft Fabric Community

 

Best Regards!

Yolo Zhu

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

Thanks. It did not work. I'm still getting the error when I use ApiVersion 15.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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