When you connect Azure (or any cloud) to a third-party tool, the auth method you pick determines your blast radius if anything goes wrong on either side. Here is how we think about the four big options on Azure, with notes on their AWS / GCP equivalents.
1. Managed Identity (MI) — the gold standard
A Managed Identity is an Azure-native identity that has no secret at all. The platform issues short-lived tokens to whichever Azure resource the identity is bound to. There is nothing to rotate, nothing to leak, nothing to copy-paste.
Pros
- No long-lived credential. Nothing to steal, rotate, or accidentally check into a repo.
- Per-resource scoping — a User-Assigned MI can be attached to multiple Azure resources, or stay scoped to one.
- Full Azure RBAC support — you grant Reader / Monitoring Reader at exactly the scope you want (subscription / RG / single resource).
- Audit trail is excellent — every action is attributed in the activity log.
Cons
- Only works when the consumer runs inside Azure (the CloudMonitor scanner does — it runs in Azure under a managed identity).
- A managed identity lives in its owner's tenant. A vendor's managed identity cannot simply be granted roles in your tenant; the cross-tenant version is a multi-tenant application with a federated credential that trusts the vendor's managed identity (Microsoft Entra workload identity federation). That keeps the "no secret" property, and it is how CloudMonitor's secretless connection works.
- System-Assigned MIs disappear when the resource is deleted — not a problem in practice, but worth knowing.
Use it when: always, if you can.
AWS equivalent: IAM Role for the EC2 instance / ECS task / Lambda the scanner runs in, plus a cross-account role you assume into the target account. GCP equivalent: Workload Identity Federation, or service-account impersonation from a service-account-bound workload.
2. Service Principal (SP) — the legacy default
A Service Principal is an Entra app registration with a client secret or certificate. It works anywhere — from inside Azure, from a laptop, from a competitor's cloud — because the credential travels with the caller.
Pros
- Portable. Works whether or not the caller runs in Azure.
- Supports certificate auth (much better than client-secret).
- Familiar — every Azure-aware tool has supported SPs forever.
Cons
- You are responsible for rotating the secret/cert. If you forget, it expires and the connector breaks.
- If the secret leaks (logs, a chat paste, a stolen laptop), the attacker has whatever scope the SP has, until you rotate.
- Discovery on the Entra side is awkward — SPs accumulate and you forget what they're for.
Use it when: the scanner can't run inside Azure, or your tenant policy forbids MI for third parties. Prefer certificate auth over client-secret.
AWS equivalent: IAM user with access keys. GCP equivalent: service-account key file. In fairness to this comparison: these two are what CloudMonitor's own AWS and GCP connectors use today. A cross-account role with an external ID, and Workload Identity Federation, are the better patterns and are not built yet.
3. SAS token — resource-scoped, time-bounded
A Shared Access Signature is a URL-embedded credential for a specific Azure storage object or queue. It's narrower than an SP and rarely the right answer for a monitoring tool, but it shows up in this conversation often enough to address.
Pros
- Extremely scoped — one SAS to one container with one set of permissions and one expiry.
- Doesn't need an Entra identity at all.
Cons
- You have to mint one per resource. For a monitoring tool that watches dozens of accounts, this doesn't scale.
- If the SAS leaks, you can't revoke it without rotating the storage-account key (or pre-existing stored access policy).
- No audit trail beyond "something used this SAS."
Use it when: you have one specific resource you want a tool to watch and nothing else — e.g. forwarding a single container's logs.
4. Key Vault secret — the indirection
This is a pattern, not an auth method: store the credential in Key Vault and grant the consumer access to read it. People reach for this when they want central rotation.
Pros
- You rotate in one place; consumers re-fetch.
- Access to the secret is audited.
Cons
- The consumer still needs some auth to Key Vault — usually a managed identity. At which point you've added a step rather than solving the problem; the consumer might as well use the MI to access the target service directly.
- You've made Key Vault a chokepoint — if KV access flaps, every consumer drops.
Use it when: you have a credential that fundamentally must exist as a string (a third-party API key, an on-prem service password) and you want central rotation/audit. Don't use it as a wrapper around a credential you could have skipped entirely by using MI.
Cheat sheet
| Method | Long-lived secret? | Scope granularity | Rotation burden | When to pick |
|---|---|---|---|---|
| Managed Identity | No | RBAC, any scope | None | Default, when caller runs in Azure |
| Service Principal | Yes (cert or secret) | RBAC, any scope | You own it | Caller is outside Azure |
| SAS token | Yes (the SAS itself) | One resource, one verb set | Can't revoke without rotating account key | One-off resource access |
| Key Vault secret | Indirect | As tight as the wrapped credential | One place | Wrapping unavoidable string credentials |
CloudMonitor's default
CloudMonitor offers two Azure paths. The secretless path is the managed-identity pattern carried across tenants: you add our multi-tenant application to your directory, its only credential is a federated one trusting our scanner's managed identity, and no secret is created, stored or rotated. It is in Beta and has not yet been validated against a live customer tenant. The path known to work today is a service principal with a client secret, which we encrypt before storing; certificate credentials are not supported yet, so the certificate advice above is about other tools, not this one. Microsoft limits a client secret to 24 months and recommends federated or certificate credentials over secrets in production, which is why the secretless path is where we are heading; meanwhile, note your secret's expiry. The onboarding wizard labels which option you're picking, and the exact role assignments and minimum scopes are on the Connectors page.