Created
July 31, 2020 11:48
-
-
Save pkbullock/359dce83b35317fa459ca6fc0bba90be to your computer and use it in GitHub Desktop.
Setting up Azure AD App for use with SharePoint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Tenant = "yourtenant.onmicrosoft.com" | |
$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