Azure uses Service Principals for API access. Follow these steps:
- Register an App in Azure AD:
- Go to the Azure Portal → Azure Active Directory → App registrations → New Registration.
- Give it a name (e.g., "PreludeSCMAzureVM"), select Accounts in this organizational directory only, and register.
- Create a Client Secret:
- In your app, go to Certificates & secrets → Client secrets → New client secret.
- Copy the generated Value (this is your client secret).
- Get Subscription ID & Tenant ID:
- Go to Azure Subscriptions and copy your Subscription ID.
- Go to Azure Active Directory → Overview and copy your Tenant ID.
- Assign Permissions to the Service Principal:
- Go to Subscriptions → Select your subscription → Access Control (IAM) → Add Role Assignment.
- Assign Reader role to the App you created.