Creating a service principal

You can create a new or use an existing service principal in your Azure Active Directory tenant.

App registration

  1. Navigate to the Azure portal.

  2. Select Azure Active Directory from the left-hand side menu. Screenshot that shows the link to the Azure Active Directory

  3. Select App registrations and + New registration Screenshot that shows the link to New registration

  4. Enter a name for the application (the service principal name).

  5. Select Accounts in this organizational directory only.

  6. For Redirect URI select Web and enter any URL you want; it doesn't have to be real or work.

  7. Then select Register. Screenshot that shows the details for the new app registration Screenshot that shows the newly created application

Adding a secret to the client credentials

  1. Select the app from the App registrations Screenshot that shows the app for registration

  2. Click on the Add a certificate or secret Screenshot that shows the app

  3. Click on the + New client secret under Client secrets Screenshot that shows the client secret menu

  4. Provide a Description and set the Expires for the secret Screenshot that shows the client secret details Screenshot that shows the client secret

  5. Copy the value of Client credentials from Overview Screenshot that shows the app Overview

Adding the secret to the key vault

  1. Navigate to your Key vault Screenshot that shows the Key vault

  2. Select Settings --> Secrets --> + Generate/Import
    Screenshot that options in the Key vault

  3. Enter the Name of your choice and Value as the Client secret from your Service Principal
    Screenshot that shows the Key vault to create a secret

  4. Select Create to complete