Skip to Content
IntegrationsCloudAzure

Troubleshoot Azure Client Secrets and Certificates

Troubleshoot a Mondoo Azure integration that authenticates with a client secret or certificate, created by the manual or Terraform setup.

This page is for Azure integrations that authenticate with a client secret or a certificate. The manual setup uses a client secret, though it also accepts a certificate. The Terraform setup uses a certificate. The keyless automated setup has no certificate or secret. If you used it, see Troubleshoot on the automated setup page instead.

To learn what each integration status means, read Integration status and troubleshooting.

Scans are paused

If the integration's client secret or certificate is stored as a credential in the space, Mondoo checks it and stops scanning when it fails. The integration page shows a Scans are paused alert with one of these messages.

The credential expired

Message: Credential "<name>" has expired. Rotate it to resume scanning.

The client secret or certificate passed its expiration date.

Fix: Create a new one for the same app registration, then rotate the credential. See Renew the client secret or certificate.

Microsoft Entra ID rejected the credential

Message: Credential "<name>" was rejected by the provider. Update it to resume scanning.

Microsoft Entra ID refused the credential. The secret was deleted, the certificate isn't uploaded to the app registration, or the app registration was deleted.

Fix:

  1. Open the credential in Settings > Credentials to read the error Entra returned.
  2. Fix the app registration, or create a new client secret or certificate.
  3. Rotate the credential.

To learn more about rotating credentials, read Manage Integration Credentials.

Test the credential with cnspec

If an Azure integration fails to scan, run the same checks from cnspec to isolate whether the issue is the client secret or certificate, the app registration, or your permissions.

  1. Download the latest cnspec from releases.mondoo.com/cnspec. For example:

    wget https://releases.mondoo.com/cnspec/14.12.1/cnspec_14.12.1_linux_amd64.tar.gz
    tar -xvf cnspec_14.12.1_linux_amd64.tar.gz
  2. Scan your Azure subscription with the integration's client secret:

    cnspec scan azure \
      --subscription YOUR-SUBSCRIPTION-ID \
      --tenant-id YOUR-TENANT-ID \
      --client-id YOUR-CLIENT-ID \
      --client-secret YOUR-CLIENT-SECRET-VALUE \
      --policy-bundle https://raw.githubusercontent.com/mondoohq/cnspec/refs/heads/main/content/mondoo-azure-security.mql.yaml

    The client ID is the same as the application ID (or app ID). Azure shows a secret's value only once, so if you no longer have it, create a new client secret as described in Renew the client secret.

    If the integration authenticates with a certificate, scan with --certificate-path instead, pointing to a PEM file that holds both the certificate and its private key:

    cnspec scan azure \
      --subscription YOUR-SUBSCRIPTION-ID \
      --tenant-id YOUR-TENANT-ID \
      --client-id YOUR-CLIENT-ID \
      --certificate-path certificate.combo.pem \
      --policy-bundle https://raw.githubusercontent.com/mondoohq/cnspec/refs/heads/main/content/mondoo-azure-security.mql.yaml

Pay attention to queries with Error results. They usually point at missing permissions.

If a certificate scan fails, try a client secret

If the integration authenticates with a certificate and the certificate scan fails, create a client secret for the same app registration (in the Azure portal, under Certificates & secrets > Client secrets > New client secret) and run the client secret scan above. If that scan succeeds, the issue is the certificate. Create a new one, as described in Renew the client secret or certificate.

If the app scan fails, try direct authentication

To rule out the app registration itself, scan as your own user account. This only works if your account has the needed privileges.

cnspec scan azure \
  --subscription YOUR-SUBSCRIPTION-ID \
  --policy-bundle https://raw.githubusercontent.com/mondoohq/cnspec/refs/heads/main/content/mondoo-azure-security.mql.yaml

Renew the client secret or certificate

Client secrets and certificates expire, and the integration stops working when its credential does. To renew it, follow the steps for the setup you used:

The keyless automated setup uses no client secret or certificate, so it has nothing to renew.

Still stuck?

If none of the above works, set up the integration with your own app registration instead: Manually Set Up Azure Continuous Scanning.

Last updated on

On this page