Hello,
I have been trying to create a manual flow to populate a csv with the site names and the owners of those sites/subsites in a site collection.
It seems to grab the data but it doesn't format as expected. The flow is configured as such;
It does create the .csv however it's not in a way that can read it. I was expect column A for site name and Column B for site owner. But instead I get the following;
How can i format the output so that each itteration is on a new line and it only grabs the site URL and/or name and the owners names?
Is this possuble?
I appreciate any help you can provide.
Thank you,
DWTKBrook
Hi @Anonymous ,
I think the problem is with the website. Even when all site groups were get before, there is no owner in the title column of the output. This is different from what I tested. Perhaps you should extract items that contain "owner" in the OwnerTitle column.
@v-zhoqian-msft - Just wondering if here was any other thoughts on this. The solution provided did not work. Not sure who marked it as a solution. This would undoubtedly confuse anyone else with this issue and attempt the solution provided.
Hello @v-zhoqian-msft , I apologize for the delay, I was away for a week. I tried your suggestion and while it had no errors, it didn't provide me with the owners of the sites, below is the output of the request.
It provided the site title and URL both not the site owners(s).
Thank you,
Hi @Anonymous ,
You could try the following formula:
_api/web/webs/?$select=title,ServerRelativeURL&$SiteGroups/?$filter=substringof('Owner',Title)
Best Regards,
Community Support Team _ habsburg Qian
If this post helps, then please consider Accept it as the solution to help the other members find it.
Hello @v-zhoqian-msft ,
I looked into your suggestion, and thank you, it looked promising however, no joy.
Using the uri;
_api/web/webs/?$select=title,ServerRelativeURL&$expand=SiteGroups/?$filter=substringof('Owner',Title)
I receive the following error
I don't know what it doesn't like about the uri though.
I also tried adding the filter in the headers as well but that didn't work at all. I tried substituting 'substringof' with 'contains', same error.
It's completely baffling,
DWTKent
Hi @Anonymous ,
You could try adding filter function in uri.
Maybe this link will be useful:
SharePoint Online REST APIs (Part V): SharePoint Groups – SharePointCass
Best Regards,
Community Support Team _ habsburg Qian
If this post helps, then please consider Accept it as the solution to help the other members find it.
Hello @v-zhoqian-msft, thank you for your suggestion I will look into that however, I believe the SiteGroups Column (Image of csv below) is the issue, I make this call in the uri of the send HTTP request,
_api/web/webs/?$select=title,ServerRelativeURL&$expand=SiteGroups/Users
CSV
The other 2 columns are perfect.
I want to just expand the owners groups of each site rather than all groups.
Cheers!
Hi @Anonymous ,
I cannot see the content of the .csv file in the picture clearly. Maybe you could use the "custom" mode of "Create csv table", which can format each field.
Best Regards,
Community Support Team _ habsburg Qian
If this post helps, then please consider Accept it as the solution to help the other members find it.
I actually made a couple changes that make the output more organized but I I'm still pulling all site groups when I just want the owners of each site. I can't seem to find a way to get that and then save it into an excel.
How can i just get the owners group memberships and then export to csv if possible?
Cheers!
Tomac
986
Moderator
stampcoin
699
Super User 2025 Season 2
Riyaz_riz11
577
Super User 2025 Season 2