Skip to main content

Notifications

Community site session details

Community site session details

Session Id : 7R3SISnXw3cLDKq3dwrvjj
Power Automate - General Discussion
Unanswered

to get all SharePoint sites in tenant

Like (0) ShareShare
ReportReport
Posted on 16 Dec 2022 06:52:37 by 21

To get all the SharePoint sites in tenant using power automate

  • resappleshinnin Profile Picture
    21 on 16 Dec 2022 at 09:38:39
    Re: to get all SharePoint sites in tenant

    Screenshot 2022-12-16 150736.png

    this is the error I'm facing right now

  • v-bofeng-msft Profile Picture
    on 16 Dec 2022 at 09:31:38
    Re: to get all SharePoint sites in tenant

    Hi @resappleshinnin ,

     

    Please try:

    vbofengmsft_0-1671183068008.png

    Schema

    {
     "type": "object",
     "properties": {
     "statusCode": {
     "type": "integer"
     },
     "headers": {
     "type": "object",
     "properties": {
     "Transfer-Encoding": {
     "type": "string"
     },
     "Vary": {
     "type": "string"
     },
     "Strict-Transport-Security": {
     "type": "string"
     },
     "request-id": {
     "type": "string"
     },
     "client-request-id": {
     "type": "string"
     },
     "x-ms-ags-diagnostic": {
     "type": "string"
     },
     "X-SearchPlatform": {
     "type": "string"
     },
     "OData-Version": {
     "type": "string"
     },
     "Timing-Allow-Origin": {
     "type": "string"
     },
     "x-ms-apihub-cached-response": {
     "type": "string"
     },
     "x-ms-apihub-obo": {
     "type": "string"
     },
     "Cache-Control": {
     "type": "string"
     },
     "Date": {
     "type": "string"
     },
     "Content-Type": {
     "type": "string"
     },
     "Content-Length": {
     "type": "string"
     }
     }
     },
     "body": {
     "type": "object",
     "properties": {
     "@@odata.context": {
     "type": "string"
     },
     "@@odata.nextLink": {
     "type": "string"
     },
     "value": {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "createdDateTime": {
     "type": "string"
     },
     "description": {
     "type": "string"
     },
     "id": {
     "type": "string"
     },
     "lastModifiedDateTime": {
     "type": "string"
     },
     "name": {
     "type": "string"
     },
     "webUrl": {
     "type": "string"
     },
     "displayName": {
     "type": "string"
     },
     "root": {
     "type": "object",
     "properties": {}
     },
     "siteCollection": {
     "type": "object",
     "properties": {
     "hostname": {
     "type": "string"
     }
     }
     }
     },
     "required": [
     "createdDateTime",
     "id",
     "lastModifiedDateTime",
     "name",
     "webUrl",
     "displayName"
     ]
     }
     }
     }
     }
     }
    }

    Best Regards,

    Bof

  • resappleshinnin Profile Picture
    21 on 16 Dec 2022 at 09:23:14
    Re: to get all SharePoint sites in tenant

    Now this provides total sites but next step I want to pass only the site URL one by one not an entire result

  • v-bofeng-msft Profile Picture
    on 16 Dec 2022 at 09:19:12
    Re: to get all SharePoint sites in tenant

    Hi @resappleshinnin ,

     

    What kind of results do you need? Plain text? Can you provide a sample?

     

    Best Regards,

    Bof

  • resappleshinnin Profile Picture
    21 on 16 Dec 2022 at 09:16:54
    Re: to get all SharePoint sites in tenant

    yeah I get it but I want to pass the site URL one by one like apply to each is there a way to do it.

  • v-bofeng-msft Profile Picture
    on 16 Dec 2022 at 09:12:25
    Re: to get all SharePoint sites in tenant

    Hi @resappleshinnin ,

     

    You could try Graph API :

    vbofengmsft_0-1671181864484.png

    https://graph.microsoft.com/v1.0/sites?search=*

     

    Best Regards,

    Bof

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,731 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,079 Most Valuable Professional

Leaderboard
Loading started