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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
MH_Ger
Frequent Visitor

See and connect to all available Sharepoint sites

Background: In our company we use an an App for Teams which constantly creates new Sharepoint sites with unpredictable site names. On all of these Sharepoint sites will be Excel files with data that we want to append/combine. The problem is that, as far as I know, I can only ever connect to a single Sharepoint site (assuming that I know its name): 

 

 

= SharePoint.Contents("https://[companyname].sharepoint.com/sites/[sitename]", [ApiVersion = 15])

 

 

I was hoping, though, that I would be able to see all existing sites using the following command:

 

 

= SharePoint.Contents("https://[companyname].sharepoint.com/sites/", [ApiVersion = 15])

 

 

This however produces the following error:

MH_Ger_0-1688551169177.png

 

I have a little more success with this command:

 

= SharePoint.Contents("https://[companyname].sharepoint.com/", [ApiVersion = 15])

 

 

It generates this list, which sadly contains no information about sites:

 

MH_Ger_1-1688551687056.png

Maybe I need to have some Admin rights (which I currently don't possess) to see the sites?

Or is my code simply not adequate for the task? Or can it simply not be done?

 

Help would be greatly appreciated! Best regards!

 

 

 

0 REPLIES 0

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Users online (3,788)