Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Setting up Azure AD App for use with SharePoint
$Tenant = ""
$AppName = "PnP-PowerShell Automation Example",
$CertificatePassword = "1234", # <-- Use a better one than this, nice a super complex
$ValidForYears = 2,
$CertCommonName = "PnP-PowerShell Automation Example",
$location = Get-Location # Get the location of the script to copy the script locally
Initialize-PnPPowerShellAuthentication -ApplicationName $AppName -Tenant $Tenant -OutPath $location `
-CertificatePassword (ConvertTo-SecureString -String $CertificatePassword -AsPlainText -Force) -ValidYears $ValidForYears `
-CommonName $CertCommonName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment