Creating an Azure Service Principal for Nife-Cost Integration
To enable Nife-Cost to collect your Azure resources, you need to set up a Service Principal with the necessary permissions. Follow these steps to create the Service Principal and obtain the necessary credentials.
Prerequisites
Before you begin, ensure you have the following:
-
Azure Account:
- You must have an active Azure account with administrative privileges.
-
Azure CLI Installed:
- Make sure you have the Azure CLI installed on your system. You can download and install it from here.
-
Permissions to Create Service Principals:
- Ensure that you have the required permissions to create Service Principals and manage roles within your Azure subscription.
Step 1: Create a Service Principal
-
Login to Azure CLI:
az login -
Create a Service Principal:
az ad sp create-for-rbac --name "Nife-CostServicePrincipal" --role "Contributor" --scopes "/subscriptions/<subscription-id>"Replace
<subscription-id>with your Azure subscription ID. -
Save the Output: The output will contain the
appId,displayName,password, andtenant.
The output should look something like this:
{
"appId": "clientId",
"displayName": "Nife-CostServicePrincipal",
"password": "clientSecret",
"tenant": "tenantId"
}
Store these credentials in a safe place. You will need them to configure Nife-Cost.