web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sharepoint REST API me...
Power Automate
Unanswered

Sharepoint REST API methods

(0) ShareShare
ReportReport
Posted on by
UseCase : 
I want to dynamically get the design on the existing sharepoint site then make that as template. For that I used GetSiteScript and CreateSiteDesign in Sharepoint REST API and im using Send an HTTP request to sharepoint connector. GetSiteScript was working i'm able to get all siteScript i have in that Site, but i while using the CreateSiteDesign it throw indefinate error as "502 BadGateway" i dont know exactly how to processed. It was major doubt on sharepoint side but in power automate
 
 
error logging was very poor it was not defined briefly
Input :{
"dataset": "https://ramboll.sharepoint.com/sites/DemoKMEnergysite",
"parameters/method": "POST",
"parameters/uri": "/_api/Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptUtility.CreateSiteDesign",
"parameters/headers": {
"accept": "application/json;odata=verbose"
},
"parameters/body": "{\n \"info\": {\n \"Title\": \"Demo Site KM\",\n \"Description\": \"Creates standard theme\",\n \"SiteScriptIds\": [\"20fd8373-cafa-4a9b-b7fe-94730deea143\"] ,\n \"WebTemplate\": \"64\",\n \"PreviewImageUrl\": \"\",\n \"PreviewImageAltText\": \"KM site design theme\" \n }\n}"
}
Error:
{
"error": {
"code": 502,
"source": "default-c8823c91-be81-4f89-b024-6c3dd789c106.09.common.europe.azure-apihub.net",
"clientRequestId": "afc2e305-bee5-449f-be62-990a68db4c90",
"message": "BadGateway",
"innerError": {
"status": 502,
"message": "clientRequestId: afc2e305-bee5-449f-be62-990a68db4c90\r\nserviceRequestId: 9cdc84a1-4028-b000-d1a6-227c1c69e1f5",
"source": "https://ramboll.sharepoint.com/sites/DemoKMEnergysite/_api/Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptUtility.CreateSiteDesign",
"errors": []
}
}
}
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at
    Hi,
     
    Are you creating the site script or are you using an existing site script for your new site design?
     
    The input looks ok, exactly like the docs and I have also tested it as well in my development environment.
     
    Have you tried to resubmit the flow, does it work fine the second time? It might be an intermittent issue?
     
     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard