====== Monitor Microsoft Entra SAML Certificate Expiration in Datadog ====== ===== Overview ===== This is an unofficial Datadog Agent custom check for monitoring Microsoft Entra SAML signing certificate expiration. The check reads SAML Enterprise App certificate metadata from Microsoft Graph and reports the number of days until expiration as a Datadog custom metric. Metric: entra.saml_certificate.days_until_expiration The check runs from one Datadog Agent host. The Agent handles metric submission, so the check does not need its own Datadog API key. ===== Basic Setup ===== At a high level: - Create a Microsoft Entra app registration. - Grant Microsoft Graph application permission: ''Application.Read.All''. - Grant admin consent. - Create a client secret. - Install the custom check on one Datadog Agent host. - Configure the check with the tenant ID, client ID, and client secret. - Test the check with ''datadog-agent check entra_saml_cert_expiration''. - Restart the Datadog Agent. The included README has the full installation steps. ===== Datadog Monitor ===== Search for this metric in Datadog: entra.saml_certificate.days_until_expiration Suggested alerting: * Warning: less than 60 days * Critical: less than 30 days New custom metrics can take a few minutes to appear in Datadog after the Agent submits them. ===== Download ===== {{ :entra-saml-cert-datadog-check.zip | Download the check files }} ===== Notes ===== Run the check from one Datadog Agent host only. Running it from multiple hosts can duplicate metric series. Store the Azure client secret securely and rotate it if it is ever shared accidentally. This is an unofficial community check and is not affiliated with Microsoft or Datadog.