Microsoft Flow – Get to all your site collection details within your Office 365 tenant using Microsoft Flow?

After yesterday’s news about the new actions in the SharePoint Connector, today I thought I’ll try and take this a step further.

The challenge I gave myself is can I get to all the site collections and collect the details of my site collections using a flow? the answer is yes!

First of all I found a list that contains all the site collection information for my tenant.

The api to get to this is:

/_api/Web/Lists(guid’6f5b13c6-7732-47c4-b70a-8963fd7512c7′)/Items

So I added this uri to my Send an HTTP request to SharePoint action

And well the rest is easy!

As you can see above it is possible to display the Title of my site.

 

 

But you can get to more:

{
.....
"FileSystemObjectType": 0,
"Id": 1,
"ServerRedirectedEmbedUri": null,
"ServerRedirectedEmbedUrl": "",
"ContentTypeId": "0x010038A268F2641BCA4FA94C95C6CD37607A",
"Title": "Triad Group Plc Team Site",
"AllowGuestUserSignIn": true,
"Classification": null,
"ExternalSharing": "On",
"FileViewedOrEdited": 51,
"GroupId": "00000000-0000-0000-0000-000000000000",
"IsGroupConnected": false,
"LastActivityOn": "2018-04-19T00:00:00Z",
"NumOfFiles": 114,
"PageViews": 90,
"PagesVisited": 24,
"PrimaryAdmin": "Company Administrator",
"ShareByEmailEnabled": true,
"ShareByLinkEnabled": false,
"SiteId": "08c033be-cb3c-4d4b-b972-025791286235",
"SiteOwnerName": "Company Administrator",
"SiteSecondaryOwnerEmail": null,
"SiteSecondaryOwnerName": null,
"SiteUrl": "https:/ /pieterveenstratriaddev.sharepoint.com",
"StorageQuota": 27487790694400,
"StorageUsed": 7261335295,
"TemplateId": 1,
"TemplateTitle": "Team site (classic experience)",
"TimeCreated": "2017-07-10T13:16:48Z",
"TimeDeleted": null,
"ComplianceAssetId": null,
"State": null,
"OperationStartTime": null,
"HubSiteId": "00000000-0000-0000-0000-000000000000",
"ID": 1,
"Modified": "2018-04-23T20:50:11Z",
"Created": "2017-09-08T03:56:11Z",
"AuthorId": 1073741823,
"EditorId": 1073741823,
"OData__UIVersionString": "1.0",
"Attachments": false,
"GUID": "70424877-a75a-4acf-8bca-209a04b60cf0"
}

Things like Modification dates, HubSiteId and Site Owners are extracted within no time. And how about Storage Used? All of this information could come handy one day.

 

Advertisements


Categories:Flow, Microsoft Flow, Office 365

Tags:

13 replies

  1. This is interesting! Can you please let me know how to get the list that contains all the site collection information for my tenant.

    Like

  2. DO I need to have global admin privileges to get this list? My account just has SharePoint admin rights and I donot see an empty title list. However I see this: DO_NOT_DELETE_SPLIST_TENANTADMIN_AGGREGATED_SITECOLLECTIONS. Can you please suggest?

    Like

  3. I have found that list now! But the result is empty array. I am pretty sure I am using the current URL and there are thousands of site collections in our tenant. Can you help me on this?

    Like

  4. Body
    {
    “d”: {
    “results”: []
    }
    }

    I see the output for Send Http request to Shareoint as above. Is this the expected result? Really appreciate your time and helping me out.

    Like

  5. I am able to get the result. However I am trying to get the site collection owner names for all of the site collections retrieved. Is this possible using FLOW?

    Like

  6. How to get the Title from the list of array? How is the set variable action configured?

    Like

Please leave a comment or feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: