Parameters

Parameters

Parameters give your template flexibility. They let you apply a configuration with values supplied at runtime. The most common example is the site title, but parameters can also be used for list names, security groups, metadata, and much more.

NOTE Every configuration requires three mandatory parameters: url, title, and owner

Using the Make Provisioning Website

The easiest way to manage parameters is through the Make Provisioning website.

  • Go to View Configurations
  • Select your configuration

Figure 1: Parameters Configuration

Here you can add, edit, and delete parameters.

Understanding the parameter fields

  • ID
    The most important field. This value is referenced directly in your XML template.
    The required IDs are: url, title, and owner.

  • Title
    This is what the user sees when applying a configuration.

  • Input Type
    Defines what value is expected. Supported types:
    url, text, alphanumeric, multiline, taxonomy.

  • Sample Value
    A placeholder showing users an example of what to enter.

  • Default Value
    Pre-filled when applying the configuration—useful for parameters that rarely change (e.g., Site Collection Admin).

JSON

All parameters are stored as JSON in the Parameters metadata column of the configuration file in SharePoint.
A typical JSON structure looks like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  "d": {
    "parameters": [
      {
        "id": "url",
        "title": "Site Collection URL",
        "inputType": "url",
        "required": true,
        "sampleValue": "https://contoso.sharepoint.com/sites/communicationsite",
        "value": "https://contoso.sharepoint.com/sites/communicationsite"
      },
      {
        "id": "title",
        "title": "Title",
        "inputType": "text",
        "required": true,
        "sampleValue": "Human Resources",
        "value": "Human Resources"
      },
      {
        "id": "description",
        "title": "Description",
        "inputType": "text",
        "required": false,
        "sampleValue": "A site with news about your department",
        "value": ""
      },
      {
        "id": "owner",
        "title": "Site Owner",
        "inputType": "text",
        "required": true,
        "sampleValue": "megan.bowen@contoso.onmicrosoft.com",
        "value": "megan.bowen@contoso.onmicrosoft.com"
      },
      {
        "id": "sitecoladmin",
        "title": "Site Collection Admin",
        "inputType": "text",
        "required": true,
        "sampleValue": "alex.wilbur@contoso.onmicrosoft.com",
        "value": "alex.wilbur@contoso.onmicrosoft.com"
      }
    ]
  }
}

If you’re comfortable with JSON, you can edit this directly in your preferred editor.

Using Parameters in Your Template

To use parameters in your XML template, reference their ID inside braces:
{title}, {sitecoladmin}, {url}, and so on.

Example:

1
2
3
4
5
6
7
<Site Url="{url}" Title="{title}" Template="STS#3" LCID="1033" OwnerLogin="{owner}" UserCodeQuota="0" StorageQuota="0">
    <RootWeb Url="{url}" Title="{title}" Description="{description}" Template="STS#3" LCID="1033">
        <Features>
            <Feature Id="8a4b8de2-6fd8-41e9-923c-c7c3c00f8295" Name="Open Documents in Client Applications by Default"/>
        </Features>
    </RootWeb>
</Site>

This allows the same template to be reused with different inputs, making your provisioning workflow far more flexible.