Basic configuration (Azure)
Simple steps to enable your Azure cloud environmentSimple steps to enable your Azure cloud environment
Azure
In Azure, a Service Principal is like a user identity with a specific role and permissions, but it's used by applications, scripts, or services to access Azure resources. This document will run through creating a Service Principal with a secret. The secret is a password or key that your application will use to authenticate itself when accessing Azure services.
Service Principals provide a secure and manageable way for your applications to access Azure resources. Instead of using your personal Azure account, you can create a specific identity for your application, reducing security risks and improving accountability.
As the creator of the service principal, you and your organisation retain full control over access to your environment; if access needs to be removed, you have the ability to remove access by the service principal.
Sign in to the Azure Portal
Sign in to the Azure portal using your Azure account and locate the Azure Active Directory (Azure AD) service where identity and authentication is managed in Azure.
Create a new Application registration
In Azure Active Directory, select "App registrations" from the left-hand menu and click the "+ New registration" button. Enter the following details:
- Application name: how it will be identified in Azure AD. Feel free to choose something meaningful for this purpose that conforms with other
- Supported account type: which accounts will be able to use this Service Principal. Generally, "Accounts in this organizational directory only" is a safe choice.
Once ready, click "Register" to create the application.
On the application's overview page, take note of and record the Application (client) ID to provide later.
Generate a Client secret
A secret should be created to complete the credential set used to authenticate as that service principal. Navigate to "Manage" in the menu and select "Certificates & secrets". Under the "Client secrets" section, click on "+ New client secret" and provide the following details:
- Description: information relating to the usage of the secret. It is recommended that some wording around its use by this service be included
- Expiration duration: for what period the secret is valid; one year is commonly used however it is important to consider your internal security requirements. Also note that this informs when you will need to replace this secret.