Skip to main content

Microsoft Azure Integration

Cloud ex Machina (CXM) connects to your Azure tenant to provide FinOps analysis, cost optimization recommendations, and infrastructure insights.

Architecture​

CXM uses a Service Principal with read-only access to collect data from three areas:

ComponentPurposeData Collected
Asset DiscoveryInfrastructure inventoryAll Azure assets across subscriptions
Billing ExportCost analysisCost Management export files (CSV/Parquet)
Activity LogsChange trackingAdministrative operations and audit trail

Key Concepts​

Service Principal​

CXM authenticates using an Azure AD Application with an associated Service Principal. This identity is granted read-only roles to access your assets.

Scope Options​

You can grant CXM access at different levels:

  • Single Subscription: Access to one specific subscription
  • Multiple Subscriptions: Access to a list of subscriptions
  • All Subscriptions: Access to all subscriptions in the tenant (with optional exclusions)
  • Management Group: Access at management group level (inherits to all child subscriptions)

Storage Accounts​

CXM reads cost and activity data from storage accounts where Azure exports this information:

  • Billing Exports: Storage account containing Cost Management exports
  • Activity Logs: Storage account receiving diagnostic settings logs

These storage accounts typically already exist in your environment. CXM only needs read access to them.

Prerequisites​

Before starting the setup, ensure you have:

Azure Permissions​

  • Azure AD: Permission to create App Registrations (or Global Administrator for Directory Reader role)
  • Subscriptions: Owner or User Access Administrator on target subscriptions
  • Storage Accounts: Reader access to billing and activity log storage accounts

Existing Assets​

Identify the following in your environment:

AssetHow to Find
Billing Export Storage AccountAzure Portal > Cost Management > Exports
Activity Log Storage AccountAzure Portal > Monitor > Activity Log > Diagnostic Settings

If these don't exist yet, you'll need to create them as part of the setup.

Setup Methods​

Choose the method that best fits your workflow:

MethodBest ForTime
TerraformInfrastructure-as-code teams, repeatable deployments10-15 min
Azure PortalQuick setup, no Terraform experience required20-30 min

Both methods create the same objects and provide the same level of access to CXM.

Permissions Granted​

CXM requests minimal, read-only permissions:

Asset Discovery Roles​

RoleScopePurpose
ReaderSubscriptions or Management GroupRead all Azure assets
Monitoring ReaderSubscriptions or Management GroupRead metrics and diagnostics
Key Vault ReaderSubscriptions or Management GroupRead vault metadata (not secrets)

Storage Access (Custom Role)​

PermissionPurpose
Microsoft.Storage/storageAccounts/readRead storage account properties
Microsoft.Storage/storageAccounts/blobServices/containers/readList containers
Microsoft.Storage/storageAccounts/blobServices/containers/blobs/readRead export files
Microsoft.CostManagement/exports/readRead export configurations
Microsoft.Insights/diagnosticSettings/readRead diagnostic settings

Optional: Directory Reader​

If enabled, allows CXM to read Azure AD users and groups for cost attribution. Requires Azure AD admin privileges to assign.

Optional: Azure Databricks​

CXM can read the Databricks system tables and the Databricks commit unit (DBCU) reservations with the same Service Principal. See Azure Databricks Access.

Optional: AKS​

CXM can read the Kubernetes API of your AKS clusters, Secrets excluded, with the same Service Principal. See AKS Access.

Security Considerations​

These items cover only the Azure roles of this page. For Azure Databricks, see the Security Considerations of Azure Databricks Access. For AKS, see the Security Considerations of AKS Access.

  1. Read-Only Access: CXM cannot create, modify, or delete any assets
  2. No Data Plane Access: CXM cannot read actual data in databases, storage blobs (except export containers), or other services
  3. Scoped Access: You control exactly which subscriptions CXM can access
  4. Audit Trail: All CXM access is logged in Azure Activity Logs

Next Steps​

Choose your setup method: