Skip to content

Commit 074bc0d

Browse files
Merge pull request #5134 from jackpoz/features/RegisterEntraAppNoPfx
Allow to call Register-PnPEntraIDApp with a certificate without private key
2 parents 469493f + ca12a4d commit 074bc0d

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/Commands/AzureAD/RegisterAzureADApp.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,6 @@ private X509Certificate2 GetCertificate(PSObject record)
471471
{
472472
throw new PSArgumentNullException(nameof(CertificatePassword), $"Failed to import private key certificate. Ensure the correct password is provided for parameter: {nameof(CertificatePassword)}");
473473
}
474-
475-
// Ensure the certificate at the provided CertificatePath holds a private key
476-
if (!cert.HasPrivateKey)
477-
{
478-
throw new PSArgumentException(string.Format(Resources.CertificateAtPathHasNoPrivateKey, CertificatePath), nameof(CertificatePath));
479-
}
480474
}
481475
else
482476
{

0 commit comments

Comments
 (0)