Forum Discussion
buszi99
Jun 21, 2024Brass Contributor
PNP Connect with certificate
Hello. I have 2 registered applications in Azure. I genereted certificates and uploaded and also i granted permissions. Situation is weird because app1 i can acces from only one computer app2 from se...
VasilMichev
Jun 21, 2024MVP
If you are connecting by providing the certificate thumbprint, make sure that the private key for the certificate is available on the local machine and the user account you're logged in on the device is able to read the key.
buszi99
Jul 01, 2024Brass Contributor
i'm using this powershell code:
$SiteURL = "https:/xxxx.sharepoint.com/sites/site11/"
$ClientID = "appipd"
$ThumbPrint = "<thubprint here>"
$Tenant = "xxx.onmicrosoft.com"
Connect-PnPOnline -Url $SiteURL -ClientId $ClientID -Thumbprint $ThumbPrint -Tenant $Tenant
$SiteURL = "https:/xxxx.sharepoint.com/sites/site11/"
$ClientID = "appipd"
$ThumbPrint = "<thubprint here>"
$Tenant = "xxx.onmicrosoft.com"
Connect-PnPOnline -Url $SiteURL -ClientId $ClientID -Thumbprint $ThumbPrint -Tenant $Tenant
- VasilMichevJul 01, 2024MVPRight, try using the -CertificatePath parameter instead of -Thumbprint (and make sure to also provide the password as needed).
- buszi99Jul 02, 2024Brass ContributorBut I want to run this script in Azure Function. Do you have an idea how to make it?