You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Your application creates a webhook subscription. When it does, it gets the current **changeToken** from the list it created the webhook for.
136
-
2. Your application persists the **changeToken** in a persistent storage, such as SQL Azure in this case.
137
-
3. A change in SharePoint occurs, and SharePoint calls your service endpoint.
138
-
4. Your service endpoint serializes the notification request and stores it in a storage queue.
139
-
5. Your web job sees the message in the queue and starts your message processing logic.
140
-
6. Your message processing logic retrieves the last used change token from the persistent storage.
141
-
7. Your message processing logic uses the `GetChanges()`API to determine what changed.
142
-
8. The returned changes are processed and now your application performs what it needs to do based on the changes.
143
-
9. Finally, the application persists the last retrieved **changeToken** so that next time it does not receive changes that were already processed.
136
+
1. Your application persists the **changeToken** in a persistent storage, such as SQL Azure in this case.
137
+
1. A change in SharePoint occurs, and SharePoint calls your service endpoint.
138
+
1. Your service endpoint serializes the notification request and stores it in a storage queue.
139
+
1. Your web job sees the message in the queue and starts your message processing logic.
140
+
1. Your message processing logic retrieves the last used change token from the persistent storage.
141
+
1. Your message processing logic uses the `GetChanges()`API to determine what changed.
142
+
1. The returned changes are processed and now your application performs what it needs to do based on the changes.
143
+
1. Finally, the application persists the last retrieved **changeToken** so that next time it does not receive changes that were already processed.
144
144
145
145
## Work with webhook renewal
146
146
@@ -157,7 +157,7 @@ Create a web job that on a weekly basis reads all the subscription IDs from the
157
157
> [!NOTE]
158
158
> This web job is not part of this reference implementation.
159
159
160
-
The actual renewal of a SharePoint list webhook can be done by using a [`PATCH /_api/web/lists('list-id')/subscriptions(‘subscriptionID’)`](./lists/update-subscription.md) REST call.
160
+
The actual renewal of a SharePoint list webhook can be done by using a `[PATCH /_api/web/lists('list-id')/subscriptions(‘subscriptionID’)](./lists/update-subscription.md)` REST call.
161
161
162
162
In the reference implementation, updating of webhooks is implemented in the [WebHookManager](https://github.com/SharePoint/sp-dev-samples/blob/master/Samples/WebHooks.List/SharePoint.WebHooks.Common/WebHookManager.cs) class of the **SharePoint.WebHooks.Common** project.
Copy file name to clipboardExpand all lines: docs/declarative-customization/get-started-create-site-design.md
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -123,13 +123,13 @@ Now that you've added a site script and site template, you can use it to create
123
123
1. Go to the home page of the SharePoint site that you are using for development.
124
124
1. Choose **Create site**.
125
125
1. Choose the type of site you need to use. SharePoint will create a team site using the Microsoft **Team collaboration template** or a communication site using the Microsoft **Topic** template unless another custom site template is set as default.
126
-
2. Choose **Next**.
127
-
4. In **Site name**, enter a name for the new site **Customer order tracking**.
128
-
7. Choose **Finish**.
129
-
5. Next, go to **Settings** and select **Apply a site template**.
130
-
5. Select the site template you just created.
131
-
8. Once applied, your new template will display under the tab in the template viewer titled **From your organization.**
132
-
9. When the new template has been applied, you will see the custom list on the page.
126
+
1. Choose **Next**.
127
+
1. In **Site name**, enter a name for the new site **Customer order tracking**.
128
+
1. Choose **Finish**.
129
+
1. Next, go to **Settings** and select **Apply a site template**.
130
+
1. Select the site template you just created.
131
+
1. Once applied, your new template will display under the tab in the template viewer titled **From your organization.**
132
+
1. When the new template has been applied, you will see the custom list on the page.
133
133
134
134
### Apply to an existing site
135
135
@@ -142,9 +142,9 @@ You can apply templates to existing site collections in bulk by using the [Invok
142
142
1. Group-connected team sites
143
143
1. Team sites that not connected to a Microsoft 365 group
144
144
1. Communication sites
145
-
2. Channel sites
146
-
3. Classic team sites
147
-
4. Classic publishing sites
145
+
1. Channel sites
146
+
1. Classic team sites
147
+
1. Classic publishing sites
148
148
149
149
The REST API to apply a site template to an existing site collection is **ApplySiteDesign**.
Copy file name to clipboardExpand all lines: docs/declarative-customization/site-design-o365cli.md
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,8 @@ Use the CLI for Microsoft 365 to create, retrieve, update, and remove site desig
16
16
To run the CLI for Microsoft 365 commands, you'll need to do the following:
17
17
18
18
1. Download and install [NodeJS LTS version](https://nodejs.org/en/)
19
-
20
-
2. Follow the instructions at [Installing the CLI](https://pnp.github.io/cli-microsoft365/user-guide/installing-cli/) to install the CLI for Microsoft 365 on your machine
21
-
22
-
3. Follow the instructions at [Logging in to Office 365](https://pnp.github.io/cli-microsoft365/user-guide/connecting-office-365/) to connect to your SharePoint tenant.
19
+
1. Follow the instructions at [Installing the CLI](https://pnp.github.io/cli-microsoft365/user-guide/installing-cli/) to install the CLI for Microsoft 365 on your machine
20
+
1. Follow the instructions at [Logging in to Office 365](https://pnp.github.io/cli-microsoft365/user-guide/connecting-office-365/) to connect to your SharePoint tenant.
23
21
24
22
To verify your setup and connection, try using the [sitedesign list](https://pnp.github.io/cli-microsoft365/cmd/spo/sitedesign/sitedesign-list) command to read the current list of site designs. If the cmdlet runs and returns with no errors, you're ready to proceed.
Copy file name to clipboardExpand all lines: docs/declarative-customization/site-design-overview.md
+11-93Lines changed: 11 additions & 93 deletions
Original file line number
Diff line number
Diff line change
@@ -32,23 +32,21 @@ Site templates can be used each time a new site is created to apply a consistent
32
32
You create site templates and register them in SharePoint to one of the modern template sites: the Team site or the Communication site. You can see how this works in the following steps.
33
33
34
34
1. Go to the SharePoint start page on your developer tenant.
35
-
36
-
2. Choose **Create site**.
35
+
1. Choose **Create site**.
37
36
38
37
You'll see the two modern template sites: **Team site** and **Communication site**.
39
38
40
-
3. Choose the type of site needed.
39
+
1. Choose the type of site needed.
41
40
42
-
- SharePoint will automatically create a communication site using the **Topic** site template.
43
-
- Had you chosen the default Team site, SharePoint will create a new site using the **Team collaboration** template.
41
+
- SharePoint will automatically create a communication site using the **Topic** site template.
42
+
- Had you chosen the default Team site, SharePoint will create a new site using the **Team collaboration** template.
44
43
45
-
For more information about how you can change the default site templates, see [Customize a default site template](customize-default-site-design.md).
44
+
For more information about how you can change the default site templates, see [Customize a default site template](customize-default-site-design.md).
46
45
47
-
4. Navigate to the **Settings** icon, and select **Apply site template** to review Microsoft-provided site templates based on the type of site you chose in step three.
46
+
1. Navigate to the **Settings** icon, and select **Apply site template** to review Microsoft-provided site templates based on the type of site you chose in step three.
48
47
49
48
When a site template is selected, SharePoint creates the new site, and runs site scripts for the site template. The site scripts provide the details for the template such as creating new lists or applying a theme. These script actions are run in the background. When the scripts are complete the page will refresh to display the site script details.
50
49
51
-
52
50
> [!NOTE]
53
51
> Site templates can now be applied to previously created modern site collections. For more information, see the [REST API](site-design-rest-api.md) and [PowerShell](site-design-powershell.md) articles.
54
52
@@ -109,8 +107,6 @@ The following example is a script that has two top-level actions. First, it appl
109
107
}
110
108
```
111
109
112
-
<br/>
113
-
114
110
Each action in a site script is specified by a **verb** value in the JSON. In the previous script, the first action is specified by the **applyTheme** verb. Next, the **createSPList** verb creates the list. Notice that the **createSPList** verb contains its own set of verbs that run additional actions on only the list.
115
111
116
112
**Available actions include:**
@@ -130,6 +126,7 @@ Each action in a site script is specified by a **verb** value in the JSON. In th
130
126
For a complete list of available actions and their parameters, see the [JSON schema](site-design-json-schema.md).
131
127
132
128
> [!NOTE]
129
+
>
133
130
> - Actions marked with ** are automatically blocked for [channel sites](/sharepoint/teams-connected-sites).
134
131
> - For libraries and lists, use the PowerShell command [Get-SPOSiteScriptFromList](/powershell/module/sharepoint-online/Get-SPOSiteScriptFromList) to create the site script syntax from an existing SharePoint list.
135
132
@@ -166,109 +163,36 @@ C:\> Add-SPOSiteDesign `
166
163
-Description "Creates customer list and applies standard theme"
167
164
```
168
165
169
-
<!--
170
-
```javascript
171
-
var site_script = {
172
-
"$schema": "schema.json",
173
-
"actions": [
174
-
{
175
-
"verb": "applyTheme",
176
-
"themeName": "Contoso Explorers"
177
-
},
178
-
{
179
-
"verb": "createSPList",
180
-
"listName": "Customer Tracking",
181
-
"templateType": 100,
182
-
"subactions": [
183
-
{
184
-
"verb": "SetDescription",
185
-
"description": "List of Customers and Orders"
186
-
},
187
-
{
188
-
"verb": "addSPField",
189
-
"fieldType": "Text",
190
-
"displayName": "Customer Name",
191
-
"isRequired": false,
192
-
"addToDefaultView": true
193
-
},
194
-
{
195
-
"verb": "addSPField",
196
-
"fieldType": "Number",
197
-
"displayName": "Requisition Total",
198
-
"addToDefaultView": true,
199
-
"isRequired": true
200
-
},
201
-
{
202
-
"verb": "addSPField",
203
-
"fieldType": "User",
204
-
"displayName": "Contact",
205
-
"addToDefaultView": true,
206
-
"isRequired": true
207
-
},
208
-
{
209
-
"verb": "addSPField",
210
-
"fieldType": "Note",
211
-
"displayName": "Meeting Notes",
212
-
"isRequired": false
213
-
}
214
-
]
215
-
}
216
-
],
217
-
"bindata": { },
218
-
"version": 1
219
-
};
220
-
221
-
RestRequest("/_api/Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptUtility.CreateSiteScript(Title=@title,Description=@desc)?@title='Contoso theme and list'&@desc='this script creates a list named customer tracking and sets the contoso explorers company theme'", site_script);
Title:"Contoso customer tracking", Description:"Creates customer list and applies standard theme", SiteScriptIds:["607aed52-6d61-490a-b692-c0f58a6981a1"], WebTemplate:"64"
226
-
}
227
-
});
228
-
```
229
-
230
-
-->
231
-
232
-
<br/>
233
-
234
166
In the previous example, the **Add-SPOSiteScript** cmdlet or **CreateSiteScript** REST API returns a site script ID. This is used for the **SiteScripts** parameter in the subsequent call to the **Add-SPOSiteDesign** cmdlet or **CreateSiteDesign** REST API.
| WebTemplate 1 | 1 | Team site (with group creation disabled) |
241
172
| WebTemplate | 68 | Communication site template |
242
173
| WebTemplate | 69 | Channel site template |
243
174
244
-
245
-
246
175
For step-by-step information about creating a site template, see [Get started creating site templates.](get-started-create-site-design.md)
247
176
248
177
> [!NOTE]
178
+
>
249
179
> - A site template can run multiple scripts. The script IDs are passed in an array, and they run in the order listed.
250
180
> - The former term for site templates may still appear in certain cmdlet and script labels as "site design."
251
181
252
-
253
182
## PnP provisioning and customization using Power Automate
254
183
255
184
One action provided by site scripts is the ability to trigger a Power Automate flow. This allows you to specify any custom action that you need beyond the actions provided natively in site scripts.
256
185
257
186
If you use the PnP provisioning engine to automate site creation, you can use a Power Automate flow to integrate with site templates. You can maintain all your existing provisioning scripts as well as create new custom provisioning scripts by using this technique.
258
187
259
-
<br/>
260
-
261
188

262
189
263
190
The process works as follows:
264
191
265
192
1. The script instantiates your Power Automate flow using a URL with additional details.
266
-
267
-
2. The flow sends a message to an Azure storage queue that you have configured.
268
-
269
-
3. The message triggers a call to an Azure function that you have configured.
270
-
271
-
4. The Azure function runs your custom script, such as the PnP provisioning engine, to apply your custom configurations.
193
+
1. The flow sends a message to an Azure storage queue that you have configured.
194
+
1. The message triggers a call to an Azure function that you have configured.
195
+
1. The Azure function runs your custom script, such as the PnP provisioning engine, to apply your custom configurations.
272
196
273
197
For a step-by-step tutorial about how to configure your own Power Automate flow with PnP provisioning, see [Build a complete site template using the PnP provisioning engine](site-design-pnp-provisioning.md).
To verify your setup and connection, try using the `Get-PnPSiteScript` cmdlet to read the current list of site scripts. If the cmdlet runs and returns with no errors, you're ready to proceed.
Copy file name to clipboardExpand all lines: docs/declarative-customization/site-design-powershell.md
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,7 @@ Use PowerShell cmdlets to create, retrieve, update, and remove site designs and
14
14
To run the PowerShell cmdlets, you'll need to do the following:
15
15
16
16
1. Download and install the [SharePoint Online Management Shell](https://www.microsoft.com/download/details.aspx?id=35588). If you already have a previous version of the shell installed, uninstall it first and then install the latest version.
17
-
18
-
2. Follow the instructions at [Connect to SharePoint Online PowerShell](https://technet.microsoft.com/library/fp161372.aspx) to connect to your SharePoint tenant.
17
+
1. Follow the instructions at [Connect to SharePoint Online PowerShell](https://technet.microsoft.com/library/fp161372.aspx) to connect to your SharePoint tenant.
19
18
20
19
To verify your setup, try using the [Get-SPOSiteScript](/powershell/module/sharepoint-online/Get-SPOSiteScript) cmdlet to read the current list of site scripts. If the cmdlet runs and returns with no errors, you're ready to proceed.
0 commit comments