Error logging for Site Designs and Site Scripts
Hi there,
I'm finding that a lot of the flow actions in my site designs are failing immediately when provisioning a site. The pop-out displays a generic error message when I load the site which doesn't give any information about what exactly when wrong.
The frustrating part, though, is that the flow itself doesn't have any record of being called. This leads me to believe that the action is failing before it even makes it that far.
However, as I said, this is seemingly random. I can make 10 sites and 8 of them work perfectly, but the other two fail for some other reason. Having some way of seeing the errors generated by a site design would let me better troubleshoot, instead of fumbling around in the dark.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 1afac891-6cf5-1746-6392-8cb61a441770
- Version Independent ID: b5d1f95b-f40b-8d0c-7334-7608a3add9ff
- Content: Using site designs and Microsoft Flow to track site creation requests
- Content Source: docs/declarative-customization/site-design-trigger-flow-tutorial.md
- Product: sharepoint
- GitHub Login: @spdevdocs
- Microsoft Alias: spdevdocs
Could you please provide the scripts you have run and the error messages after you run the script?
Here's an example of a site script failing for no seeming reason:

All of the list creation scripts use the same action, which calls a flow and passes in some list creation parameters. I've included the one that failed below, with the URL removed:
{
"$schema": "schema.json",
"actions": [
{
"verb": "triggerFlow",
"url": "",
"name": "Create Status Report List",
"parameters": {
"listTitle": "Status Report",
"listTemplate": 100,
"fields": [
{
"title": "Accomplishments",
"type": "Multiline"
},
{
"title": "Budget",
"type": "Choice",
"description": "Green - Negative variance under 15%; Yellow - Negative variance 15-20%; Red - Negative variance over 20%.",
"choices": [
"Red",
"Yellow",
"Green"
]
},
{
"title": "Budget Comments",
"internal": "BudgetComments",
"type": "Multiline"
},
{
"title": "Due Date",
"internal": "TaskDueDate",
"type": "DateTime"
},
{
"title": "Next Milestone",
"internal": "NextMilestone",
"type": "DateTime"
},
{
"title": "Next Milestone Description",
"internal": "NextMilestoneDescription",
"type": "Multiline"
},
{
"title": "Percent Complete",
"internal": "PercentComplete1",
"type": "Number"
},
{
"title": "Project Manager",
"internal": "ProjectManager",
"type": "User"
},
{
"title": "Quality",
"type": "Choice",
"choices": [
"Red",
"Yellow",
"Green"
]
},
{
"title": "Quality Comments",
"internal": "QualityComments",
"type": "Multiline"
},
{
"title": "Schedule",
"type": "Choice",
"description": "Green - Milestone reached within the quarter (+/- weeks); Yellow - Milestone delayed 1 quarter (+/- 2 weeks); Red - Milestone delayed more than 1 quarter.",
"choices": [
"Red",
"Yellow",
"Green"
]
},
{
"title": "Schedule Comments",
"internal": "ScheduleComments",
"type": "Multiline"
},
{
"title": "Scope",
"type": "Choice",
"choices": [
"Red",
"Yellow",
"Green"
]
},
{
"title": "Scope Comments",
"internal": "ScopeComments",
"type": "Multiline"
},
{
"title": "Status",
"type": "Choice",
"choices": [
"(1) Not Started",
"(2) In Progress",
"(3) In Distribution",
"(4) Approved",
"(5) On Hold",
"(6) Deferred",
"(7) Cancelled",
"(8) Project Closed"
]
}
]
}
}
],
"version": 1
}
I can understand that there might be something wrong in the site script, but it would be really helpful if SharePoint provided more debugging information somewhere.
could you provide the information as follows:
- The flow run history logs (Create Status Report List)
- The flow's trigger and action information (Create Status Report List)
- How many triggers flow have you created?
- The flow history logs have no record of that site action being called. What do you want from the logs? The same flow is used by all the list creation actions, so it'll just show the rest of the calls being fulfilled with no indication it was called by "Create Status Report List".
- The flow is triggered by an HTTP request and sends an HTTP request to an azure function. It doesn't do anything else.
- Probably dozens. I've made lots of flows, and it's only when using site scripts have I run into problems where they aren't called consistently.
This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open the issue.