-
Notifications
You must be signed in to change notification settings - Fork 390
Allow to call Register-PnPEntraIDApp with a certificate without private key #5134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to call Register-PnPEntraIDApp with a certificate without private key #5134
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the private key validation check when using an existing certificate with the Register-PnPAzureADApp cmdlet. The removed code ensured that certificates provided via the -CertificatePath parameter contain a private key before proceeding with app registration.
- Removes the
HasPrivateKeyvalidation check for certificates loaded from a file path - Eliminates the associated error message that would inform users when their certificate lacks a private key
074bc0d
into
pnp:dev
Hey thanks @jackpoz, Merged it.
//Nish
Type
Related Issues?
Fixes #5129
What is in this Pull Request ?
Allow to call Register-PnPEntraIDApp with a certificate without private key, so .cer instead of .pfx .
The private key is not needed when uploading a certificate to an app registration in Entra ID.
Here's the behavior with the PR:
image
The app registration works fine, see below a test case (notice how the pfx is used in this case with Connect-PnPOnline) :
image