Skip to content

Instantly share code, notes, and snippets.

@gautamdsheth
Last active September 7, 2020 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gautamdsheth/80488ff2055fb52486e1c12629d0e20d to your computer and use it in GitHub Desktop.
Save gautamdsheth/80488ff2055fb52486e1c12629d0e20d to your computer and use it in GitHub Desktop.
$tenant = "tenant.onmicrosoft.com"
# Create Azure AD app
$psa = Initialize-PnPPowerShellAuthentication -ApplicationName TestTeamsApp -Tenant $tenant -Store CurrentUser
# Connect to SPO+Graph using certificate authentication
Connect-PnPOnline "https://tenant-admin.sharepoint.com/" -Tenant $tenant -ClientId $psa.AzureAppId
-Thumbprint $psa.'Certificate Thumbprint'
# Store the extracted template somwhere
Get-PnPTenantTemplate -Out "TeamTemplate.xml" -Configuration "ExtractTeam.json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment