Creating a service principal
You can create a new or use an existing service principal in your Azure Active Directory tenant.
App registration
Navigate to the Azure portal.
Select Azure Active Directory from the left-hand side menu.
Select App registrations and + New registration
Enter a name for the application (the service principal name).
Select Accounts in this organizational directory only.
For Redirect URI select Web and enter any URL you want; it doesn't have to be real or work.
Then select Register.
Adding a secret to the client credentials
Select the app from the App registrations
Click on the Add a certificate or secret
Click on the + New client secret under Client secrets
Provide a Description and set the Expires for the secret
Copy the value of Client credentials from Overview
Adding the secret to the key vault
Navigate to your Key vault
Select Settings --> Secrets --> + Generate/Import
Enter the Name of your choice and Value as the Client secret from your Service Principal
Select Create to complete
Maklum balas
Kirim dan lihat maklum balas untuk