Created
November 11, 2020 00:35
-
-
Save pkbullock/f6e6359000520b2157ae7d44fa5bd03e to your computer and use it in GitHub Desktop.
Register Azure AD app using PnP PowerShell
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
Initialize-PnPPowerShellAuthentication -ApplicationName CaPa.Reporting ` | |
-Tenant "tenant.co.uk" -Store CurrentUser -ValidYears 2 ` | |
-CertificatePassword (ConvertTo-SecureString -String "password" -AsPlainText -Force) | |
# Output Example from PS: | |
# | |
# AzureAppId Certificate Thumbprint | |
# ---------- ---------------------- | |
# c53eb8da-8bdf-44f9-8718-1fb1bbbbbb EC1E61510AEC35624AF78FEA763D00000000 | |
# | |
# Example Test Connection | |
Connect-PnPOnline -ClientId c53eb8da-8bdf-44f9-8718-1fb1bbbbbb ` | |
-Thumbprint EC1E61510AEC35624AF78FEA763D00000000 ` | |
-Tenant "tenant.co.uk" -Url "https://tenant.sharepoint.com" | |
Get-PnPSite |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment