- Open Azure key vault and navigate to
Certificates
section. - Click on
Generate/Import
button to create a certificate.
- Fill the required details. Make sure
Method of Certificate Creation
is Generate.
-
Once the certificate is created, open the certificate and copy the thumbprint. This will be the value of
CertificateThumbprint
in appsettings.json file -
Click on Current version of certificate.
- It will open a menu, click on
Download in PFX/PEM format
Once the download is completed open the downloaded certificate.
Click on next and ignore the password and click next again and when it ask to store certificate enter Personal
.
Click on Finish to continue.
- Open Manage user certificate from start menu.
- Go to
Personal
->Certificates
and open certificate you installed. - Go to Details tab and click on
Copy to File...
- Click on next-next and select format as Base-64 encoded X.509 (.CER).
- Give it a path and Finish the process.
- Right click on exported certificate and Open with notepad
- Copy the content between
-----BEGIN CERTIFICATE-----
and-----END CERTIFICATE-----
. This will be the value ofBase64EncodedCertificate
in appsettings.json file.