Skip to content

Commit b7dcda3

Browse files
Merge pull request SharePoint#9221 from KoenZomers/UpdatingProvisioningTemplateDocumentation
Updated the PnP cmdlets in the Tenant provisioning documentation
2 parents 3a8e1a5 + f354694 commit b7dcda3

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

docs/solution-guidance/pnp-provisioning-tenant-templates.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: PnP Provisioning Tenant Templates
33
description: Think of Tenant Templates as an extension on top of PnP Provisioning or Site Templates. Instead of just provisioning artifacts to a site, you can now create sites, create teams, provision Azure AD entries, provision taxonomy etc.
4-
ms.date: 04/28/2022
4+
ms.date: 09/21/2023
55
ms.localizationpriority: high
66
---
77

@@ -81,24 +81,23 @@ As the only way to create a team programmatically is by using the Microsoft Grap
8181
You can do this as follows:
8282

8383
```
84-
Connect-PnPOnline -Graph -LaunchBrowser
84+
Register-PnPManagementShellAccess
8585
```
8686

87-
This will copy a so-called device code to your clipboard and it will step your through a wizard to provide consent. Notice that this is a one time action only. After you performed this consent step you can use the normal ways of connecting with PnP PowerShell as you are used to.
87+
This is a one time action only. After you performed this consent step you can use the normal ways of connecting with PnP PowerShell as you are used to.
8888

8989
The flow the provisioning engine uses is as follows:
9090

91-
1. You login using your credentials with `Connect-PnPOnline`
92-
2. You apply the template with Apply-PnPTenantTemplate -Path yourtemplate.pnp
91+
1. You login using your credentials with `Connect-PnPOnline <tenant>.sharepoint.com -Interactive`
92+
2. You apply the template with `Invoke-PnPTenantTemplate -Path yourtemplate.pnp`
9393
3. The Provisioning Engine will start to provision any SharePoint artifact it finds in that template
9494
4. The moment the engine encounters an artifact which requires an access token for the Microsoft Graph it will call back to PnP PowerShell to acquire such a token
9595
5. PnP PowerShell will try, using the credentials you used in step 1 and the consent you provided earlier as written above, to acquire a token using the PnP Management Shell multi-tenant Azure application registration. The moment it successfully acquired the token it will return this token to the provisioning engine which will use that token to make the appropriate calls to the Microsoft Graph API.
9696

97-
If at a later state you want to remove this consent, login to your Azure Portal, and navigate to the Azure Active Directory. In the Enterprise Applications section you will find an entry called "PnP Management Shell". Remove this entry to clear the consent.
98-
97+
If at a later state you want to remove this consent, login to your Azure Portal, and navigate to the Azure Active Directory. In the Enterprise Applications section you will find an entry called "PnP Management Shell" with client id 31359c7f-bd7e-475c-86db-fdb8c937548e. Remove this entry to clear the consent.
9998

10099
## See also
101100

102101
- [Microsoft 365 Patterns and Practices](https://pnp.github.io/)
103102
- [SharePoint Developer Group at Microsoft Tech Community](https://techcommunity.microsoft.com/t5/SharePoint-Developer/bd-p/SharePointDev)
104-
- [PnP remote provisioning](pnp-remote-provisioning.md)
103+
- [PnP remote provisioning](pnp-remote-provisioning.md)

0 commit comments

Comments
 (0)