New SharePoint Site Provisioning Request
Handles SharePoint site provisioning requests submitted through Forms. Routes for approval, then uses HTTP/Graph API to create the site with configured template, permissions, and initial content.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Overview
A self-service SharePoint site provisioning request flow. End users submit a Microsoft Forms request describing the site they need (title, owner, template, business justification). The request is routed to a SharePoint administrator for Approve/Reject review. On approval, the flow creates the site via the SharePoint REST SPSiteManager/create endpoint (called from a built-in HTTP action with Azure AD app-only credentials) and emails the requester with the new site URL. On rejection, the flow emails the requester with the approver's comments so they can revise and resubmit.
Use Case
IT teams running tenants where end users routinely request new project, departmental, or community SharePoint sites — but where each request needs admin oversight to enforce naming conventions, template selection, and ownership rules. This flow eliminates manual ticket triage by giving the admin a single approval dialog with all the context, then automating the provisioning step so they don't have to switch over to the SharePoint Admin Center.
The flow is ideal for teams that:
- IT teams that field frequent ad-hoc SharePoint site requests from project and departmental users
- Tenants that need to enforce naming conventions, template selection, and ownership rules on every new site
- Organizations that want to remove manual ticket triage while keeping a clear admin approval gate
Flow Architecture
When Site Provisioning Form Submitted
Microsoft Forms - CreateFormWebhook (OpenApiConnectionWebhook)Subscribes to the configured Microsoft Form (flowlibs_SiteProvisioningFormId) and fires when a new response is submitted.
Init varSiteAdminEmail
InitializeVariable (string)Loads the SharePoint admin approver email from `flowlibs_SPAdminApproverEmail`.
Init varTenantRoot
InitializeVariable (string)Loads the SharePoint tenant root URL from `flowlibs_SharePointSiteURL`; used as both the SP REST audience and the new site URL prefix.
Init varDefaultTemplate
InitializeVariable (string)Loads the fallback site template from `flowlibs_DefaultSiteTemplate` (used when the form answer is empty).
Init varDefaultLcid
InitializeVariable (string)Loads the default locale ID from `flowlibs_DefaultSiteLcid` for the SPSiteManager.create body.
Init varRequesterNotifyEmail
InitializeVariable (string)Loads the fallback notification recipient from `flowlibs_NotificationEmailAddress`.
Get Form Response Details
Microsoft Forms - GetFormResponseById (OpenApiConnection)Pulls the full form response using `response_id` from the trigger output `body/resourceData/responseId`.
Compose Site Title
ComposeCoalesces the form's site-title answer with a fallback value.
Compose Site Owner Email
ComposeCoalesces the form's owner-email answer with the form responder and the admin fallback.
Environment Variables
| Schema name | Type | Default | Description |
|---|---|---|---|
| flowlibs_SiteProvisioningFormId | String | <configure> | Microsoft Forms form GUID the webhook subscribes to. |
| flowlibs_SiteTitleQuestionId | String | r0001 | Question ID for the site title field on the request form. |
| flowlibs_SiteOwnerEmailQuestionId | String | r0002 | Question ID for the requested site owner email field on the form. |
| flowlibs_SiteDescriptionQuestionId | String | r0003 | Question ID for the business justification / description field on the form. |
| flowlibs_SiteTemplateQuestionId | String | r0004 | Question ID for the selected template field on the form (CommunicationSite / TeamSite). |
| flowlibs_SPAdminApproverEmail | String | spadmin@your-tenant.onmicrosoft.com | Approver assignee for the StartAndWaitForAnApproval action. |
| flowlibs_DefaultSiteTemplate | String | SITEPAGEPUBLISHING#0 | SharePoint `WebTemplate` used when the form template answer is empty. |
| flowlibs_DefaultSiteLcid | String | 1033 | Locale ID written into the SPSiteManager.create request body. |
| flowlibs_SharePointSiteURL |
Connectors & Connections
| Connector | API name | Actions used |
|---|---|---|
| Microsoft Forms | shared_microsoftforms | CreateFormWebhook (trigger) GetFormResponseById |
| Approvals | shared_approvals | StartAndWaitForAnApproval |
| Office 365 Outlook | shared_office365 | SendEmailV2 |
| HTTP (built-in) | http | HTTP (ActiveDirectoryOAuth against the SharePoint tenant root for SPSiteManager/create) |
Note — All connections are referenced as solution connection references; the flow is portable between environments as long as a connection is mapped at import time.
Customization Guide
Almost every realistic variant of this flow can be implemented by changing environment variable values. A few cases require small edits inside the flow definition — those are called out explicitly below.
- Wire up the request form
- Build a Microsoft Form titled 'SharePoint Site Provisioning Request' with: Site title (short, required), Site owner email (short, required), Business justification (long), and Site template (choice — Communication Site / Team Site). Once published, run the Forms connector op GetQuestions (/forms('{form_id}')/questions) in a sandbox flow to grab each question id. Set the form GUID into flowlibs_SiteProvisioningFormId and the four question IDs into the matching flowlibs_Site*QuestionId env vars (Current Value).
- Create the AAD app for the HTTP action
- The HTTP_Create_SharePoint_Site action uses ActiveDirectoryOAuth, so you need an app registration with SharePoint application permission Sites.FullControl.All (admin-consented). Set flowlibs_GraphTenantId to your tenant GUID, flowlibs_GraphClientId to the app's Application (client) ID, and flowlibs_GraphClientSecret to a fresh client secret value — set the secret via Current Value at deploy time rather than baking it into the default.
- Choose your default site template
- flowlibs_DefaultSiteTemplate is used when the form template answer is empty. Common values: SITEPAGEPUBLISHING#0 (modern Communication Site, no group), STS#3 (modern Team Site, no group), GROUP#0 (M365 group-connected team site — note this one won't work via SPSiteManager; for group-connected sites swap the HTTP action to call POST https://graph.microsoft.com/v1.0/groups instead and let SharePoint auto-provision the site).
- Switch to Graph site provisioning
- If you need Microsoft Graph instead of SP REST, change the HTTP action
Key Expressions
The flow is intentionally light on Power Fx / WDL gymnastics — the heaviest expressions are the branch-name concatenation and the approval outcome check. They are listed below in the order they appear in the flow.
EXPR.01Trigger output → response ID
Pulls the form response ID from the Forms webhook trigger payload shape.
EXPR.02Dynamic form answer lookup
Bracket-indexed lookup using the env-var question ID keeps the flow portable across forms.
EXPR.03Site alias from title
Lower-cases the title and strips slashes / backslashes for use as the URL suffix.
EXPR.04Compute final site URL
Concatenates the tenant root URL with `/sites/` and the alias to form the new site URL.
EXPR.05Approval outcome check
Used in the If condition to branch on Approve vs Reject.
EXPR.06Approver comments with fallback
Pulls the first approver's comments, defaulting to 'No comments' if blank.
EXPR.07HTTP audience
The tenant root URL doubles as both the SPO site prefix and the OAuth resource (audience) for SP REST app-only auth.
Comments
Sign in to join the conversation.
Sign inNo comments yet. Be the first to share your experience with this flow.