Create-SecureCertificatePassword
Closed this issue · 1 comments
I'm down to creating the secure certificate password. I'm having issues, I think from inexperience. I can run this script and set a password but I'm not understanding how this relates to the registered app. I feel like I need to pull the cert password from the cert I created and assigned to the application. Do I need to be in the folder where I have the cert stored to pull the cert password with the commands in the getting started folder? Sorry if this is a silly question. Thanks,
See Step 3 of the Azure App Tutorial. When generating & exporting the certificate using PowerShell, you can assign a password of your choosing when exporting the certificate as a .pfx file.
# Export certificate to .pfx file
$mycert | Export-PfxCertificate -FilePath mycert.pfx -Password (Get-Credential).password
Then, you'd also export without a password as a .cer file.
# Export certificate to .cer file
$mycert | Export-Certificate -FilePath mycert.cer
From here, upload the .cer file into your Azure app. You'll then use the .pfx file & password in your script to authenticate to your Azure app.
You will pass the full path to your stored password file & .pfx certificate into the script as parameters, but don't necessarily need to place them in the same folder as your script.