For official documentation on creating an Azure Key Vault, see Quickstart: Create a key vault using the Azure portal.
Note
You only need to go through the following steps if you do not have an existing Azure Key Vault, or if you want to use a separate Azure Key Vault for this sample.
-
Go to Azure Portal.
-
In the portal menu, select Create a resource.
-
Search for
Key Vault
. Select Key Vault, then select Create. -
Fill in the required fields as appropriate for your Azure subscription, and select Next: Access policy.
-
Select Add Access Policy.
-
Change the Configure from template dropdown to Key, Secret, & Certificate Management.
-
For Select principal, select the None selected. Enter your application ID from your app registration in the search box, then select your app registration. Select Select.
-
Select Add, then select Review + create. Finally, select Create.
-
Wait for the Azure Key Vault to finish deploying, then follow the steps in Adding a self-signed certificate.
Note: you only need to go through the following steps if you have an existing Azure Key Vault you want to reuse for the current sample.
-
Go to your existing Azure Key Vault in the Azure portal.
-
Select Access policies under Settings. Select Add Access Policy.
-
Change the Configure from template dropdown to Key, Secret, & Certificate Management.
-
For Select principal, select the None selected. Enter your application ID from your app registration in the search box, then select your app registration. Select Select.
-
Select Add to add the new access policy. Wait for your access policy to deploy.
-
Go to the Key Vault in the Azure Portal.
-
Select Certificates under Settings, then select Generate/Import.
-
Provide values for Certificate Name and Subject. Leave all other fields at their defaults, then select Create.