# Azure

Azure connections enable integration with Microsoft Azure for health checks, configuration scraping, and playbook automation.

## Used By[​](#used-by "Direct link to Used By")

* [Azure Config Scraper](/docs/guide/config-db/scrapers/azure.md) - Scrape Azure resource configurations
* [Azure Blob Health Check](/docs/reference/canary-checker/.md) - Check Azure Blob Storage
* [Azure DevOps Pipeline](/docs/guide/playbooks/actions/azure_devops_pipeline.md) - Trigger pipelines
* [Playbook Actions](/docs/guide/playbooks/actions/.md) - Execute Azure-related automation

| Field          | Description                                                                                   | Scheme                                        |
| -------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------- |
| `tenantId*`    | The Azure Active Directory tenant ID                                                          | [EnvVar](/docs/reference/env-var.md)          |
| `clientId`     | The Azure client/application ID                                                               | [EnvVar](/docs/reference/env-var.md)          |
| `clientSecret` | The Azure client/application secret                                                           | [EnvVar](/docs/reference/env-var.md)          |
| `connection`   | The connection url to use, mutually exclusive with `tenantId`, `clientId`, and `clientSecret` | [Connection](/docs/reference/connections/.md) |

## Authentication[​](#authentication "Direct link to Authentication")

Azure connections use service principal credentials (client ID and client secret) for authentication.

## Examples[​](#examples "Direct link to Examples")

Service Principal Authentication

Create an Azure connection with service principal:

```
azure-connection.yaml
apiVersion: mission-control.flanksource.com/v1
kind: Connection
metadata:
  name: azure-production
  namespace: default
spec:
  azure:
    clientID:
      valueFrom:
        secretKeyRef:
          name: azure-credentials
          key: AZURE_CLIENT_ID
    clientSecret:
      valueFrom:
        secretKeyRef:
          name: azure-credentials
          key: AZURE_CLIENT_SECRET
    tenantID: your-tenant-id
```

With Subscription ID

Include subscription for resource access:

```
azure-with-subscription.yaml
apiVersion: mission-control.flanksource.com/v1
kind: Connection
metadata:
  name: azure-subscription
spec:
  azure:
    clientID:
      valueFrom:
        secretKeyRef:
          name: azure-credentials
          key: AZURE_CLIENT_ID
    clientSecret:
      valueFrom:
        secretKeyRef:
          name: azure-credentials
          key: AZURE_CLIENT_SECRET
    tenantID: your-tenant-id
    subscriptionID: your-subscription-id
```
