Skip to main content

Summary

This workflow automates the monitoring and renewal of Azure Enterprise Application credentials, including client secrets and certificates. The solution scans all registered enterprise applications for expiring or expired credentials, generates alerts for upcoming expirations, and can automatically rotate secrets and certificates to prevent service disruptions. By proactively managing credential lifecycles, the workflow eliminates unexpected authentication failures, maintains application availability, and ensures security compliance through regular credential rotation.

Usage

Prerequisites

Before using this workflow, ensure the following requirements are met:

  1. Microsoft Graph API Integration: Configure with the following permissions:

    • Application.ReadWrite.All - To read and update application registrations
    • Directory.Read.All - To read directory data
    • Mail.Send - To send notification emails
  2. Organizational Variables: Configure the following:

    • azure_app_expiry_warning_days: Days before expiration to trigger alerts (e.g., 30, 60, 90)
    • azure_app_auto_renew: Enable automatic credential renewal
    • azure_app_secret_validity_days: Validity period for new secrets (e.g., 365)
    • azure_app_notification_recipients: Email addresses for expiration alerts

Workflow Inputs

ParameterTypeRequiredDescription
tenant_idStringNoSpecific Azure AD tenant to scan
app_idsArrayNoSpecific application IDs to check (defaults to all)
warning_threshold_daysNumberNoDays before expiration to alert. Default: 30
auto_renewBooleanNoAutomatically renew expiring credentials. Default: false
secret_validity_daysNumberNoNew secret validity in days. Default: 365
include_expiredBooleanNoInclude already expired credentials. Default: true
send_notificationsBooleanNoSend email notifications. Default: true

Execution

  • Run daily or weekly to scan for expiring credentials
  • Configure alerts at multiple thresholds (90, 60, 30, 7 days)

Manual Trigger

  • Run on-demand for specific applications or full tenant scan

Renewal Process Flow

  1. Application Discovery: Enumerate all enterprise applications and app registrations
  2. Credential Scan: Check client secrets and certificates for expiration dates
  3. Threshold Evaluation: Compare expiration dates against warning thresholds
  4. Alert Generation: Create alerts for credentials approaching expiration
  5. Auto-Renewal: Generate new secrets/certificates if auto-renew is enabled
  6. Credential Distribution: Securely distribute new credentials to stakeholders
  7. Notification: Send expiration warnings or renewal confirmations
  8. Documentation: Log all findings and actions for audit

Returned Data

{
"success": true,
"scan_summary": {
"total_applications_scanned": 45,
"credentials_checked": 87,
"expiring_soon": 5,
"already_expired": 2,
"healthy": 80,
"auto_renewed": 3
},
"expiring_credentials": [
{
"app_name": "CRM Integration",
"app_id": "app-12345",
"credential_type": "client_secret",
"credential_id": "key-67890",
"expiration_date": "2026-04-01",
"days_until_expiry": 28,
"status": "warning",
"auto_renewed": false,
"owner": "admin@company.com"
}
],
"renewed_credentials": [
{
"app_name": "Backup Service",
"app_id": "app-54321",
"old_expiration": "2026-03-10",
"new_expiration": "2027-03-10",
"credential_type": "client_secret",
"renewed_timestamp": "2026-03-04T15:30:00Z"
}
],
"notifications_sent": {
"warning_emails": 5,
"renewal_confirmations": 3,
"recipients": ["it-admin@company.com", "security@company.com"]
}
}

Changelog

2026-03-04

  • Initial version of the document