> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/adapters/m/microsoft-azure-app-service-certificates.md).

# Microsoft Azure App Service Certificates

Azure App Service Certificates are certificate orders managed in Azure. OctoXLabs lists the certificate orders of one subscription and adds them to the certificate inventory with their expiry dates.

## Use cases

* Find certificates that are about to expire.

```
Adapters = microsoft-azure-app-service-certificates AND ExpiryStatus = expiring
```

* Find certificates that already expired.

```
Adapters = microsoft-azure-app-service-certificates AND ExpiryStatus = expired
```

## Before you begin

### Network

| Source              | Destination               | Port | Protocol |
| ------------------- | ------------------------- | ---- | -------- |
| OctoXLabs connector | login.microsoftonline.com | 443  | HTTPS    |
| OctoXLabs connector | management.azure.com      | 443  | HTTPS    |

### Required permissions

| Scope or role                           | Permission | Needed for                                                                 |
| --------------------------------------- | ---------- | -------------------------------------------------------------------------- |
| Reader (Azure RBAC, subscription scope) | Read       | Certificate orders (`Microsoft.CertificateRegistration/certificateOrders`) |

The frontend instructions require the Reader role on the subscription for the application.

## Create credentials in Microsoft Azure App Service Certificates

{% stepper %}
{% step %}

### Register an application

Sign in to the Azure Portal as an administrator, open App registrations and select New registration. Fill in the details and select Register. The Application (client) ID and Directory (tenant) ID are shown.
{% endstep %}

{% step %}

### Create a client secret

In the left menu, select Certificates & Secrets and then New client secret. Select Add and copy the secret.
{% endstep %}

{% step %}

### Assign the Reader role

Under Subscriptions, give the application the Reader role on the subscription.
{% endstep %}

{% step %}

### Copy the subscription ID

In Subscriptions, copy the Subscription ID.
{% endstep %}
{% endstepper %}

## Connection parameters

| Parameter                           | Required | Type    | Default | Description                                   |
| ----------------------------------- | -------- | ------- | ------- | --------------------------------------------- |
| Tenant ID (`tenant_id`)             | Yes      | String  |         | Directory (tenant) ID.                        |
| Client ID (`client_id`)             | Yes      | String  |         | Application (client) ID.                      |
| Client Secret (`client_secret`)     | Yes      | String  |         | Client secret value.                          |
| Subscription ID (`subscription_id`) | Yes      | String  |         | Subscription to read certificate orders from. |
| Timeout (`timeout`)                 | No       | Integer | 30      | Seconds to wait for API responses.            |

## Troubleshooting

| Error message | Cause | Fix                                    |
| ------------- | ----- | -------------------------------------- |
| Not verified  |       | No adapter-specific error text in code |

## Change history
