Azure Cost Tracking Setup
Connect Microsoft Azure to track infrastructure costs in Paygent. Paygent uses the Azure Cost Management Query API with a service principal (app registration).
What You’ll Need: An Azure subscription on a supported offer (Pay-As-You-Go, EA, or Microsoft Customer Agreement), an Entra ID app registration, and Cost Management Reader + Reader on the subscription.
Step 1 — Register an app (service principal)
- Go to Microsoft Entra ID → App registrations → New registration
- Name it (e.g.
Paygent Cost Reader) and register - Note the Application (client) ID and Directory (tenant) ID
- Under Certificates & secrets, create a Client secret and copy it once
Step 2 — Grant subscription access
Assign roles to the service principal (Enterprise application), not your user account:
- Open Subscriptions → your subscription
- Access control (IAM) → Add role assignment
- Add Reader
- Add Cost Management Reader
Step 3 — Connect in Paygent
- In Paygent go to Settings → Infra Cost → Azure
- Enter account name, Tenant ID, Client ID, Client secret, and Subscription ID
- Save — Paygent verifies subscription access and stores credentials securely
Billing latency & supported offers
- Cost data can lag 8–24 hours after resources start running
- Free Trial / Sponsorship subscriptions often do not support Cost Management APIs — upgrade to Pay-As-You-Go if Cost Analysis fails in the Azure portal
- New Azure Plan subscriptions may need up to 48 hours before Cost Management returns data
