Skip to main content

Email reports on expiring Microsoft Entra ID app secrets and certificates with Microsoft Graph

Workflow preview

Workflow preview
100%
Email reports on expiring Microsoft Entra ID app secrets and certificates with Microsoft Graph preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Monitor expiring EntraID application secrets and notify responsible Stay ahead of credential expirations by automatically detecting Entra ID application client secrets and certificates that are abo...

Best for

  • DevOps automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.splitout, n8n-nodes-base.set, n8n-nodes-base.merge, n8n-nodes-base.filter, n8n-nodes-base.httprequest, n8n-nodes-base.aggregate, n8n-nodes-base.if

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Alexander Schnabl.

Original n8n.io source

1.1 Workflow description

Title
Email reports on expiring Microsoft Entra ID app secrets and certificates with Microsoft Graph
Workflow name
Email reports on expiring Microsoft Entra ID app secrets and certificates with Microsoft Graph

Monitor expiring EntraID application secrets and notify responsible

Stay ahead of credential expirations by automatically detecting Entra ID application client secrets and certificates that are about to expire, and sending a neatly formatted email report.

What this workflow solves

Expired client secrets and certificates are a common cause of unexpected outages and failed integrations. Manually checking expiration dates across many Entra ID applications is tedious and easy to miss. This workflow automates the discovery and reporting of credentials that will expire within a configurable time window.

Key features

  • Fetches all Microsoft Entra ID applications along with:

    • Client secrets (passwordCredentials)

    • Certificates (keyCredentials)

  • Splits credentials into individual entries for easier processing

  • Filters credentials expiring within the next N days (configurable)

  • Normalizes results into a consistent structure including:

    • Application name

    • App ID

    • Credential type (Client Secret / Certificate)

    • Credential name + ID

    • Days remaining until expiration

  • Generates an HTML table report, sorted by application name

  • Sends an email only when expiring items are found (otherwise does nothing)

How it works

  1. Fetches all Entra ID applications and their credential metadata via Microsoft Graph
  2. Separates client secrets and certificates into individual entries
  3. Filters entries that expire within the configured time window
  4. Builds a normalized list of expiring items with days remaining
  5. Emails an HTML table report (only if results exist)

Setup requirements

  • Microsoft Entra ID app registration with Microsoft Graph Application permissions:

    • Application.Read.All
  • In n8n:

    • Create Microsoft Graph OAuth2 credentials (Client Credentials flow recommended)

    • Assign those credentials to the Get EntraID Applications and Secrets HTTP Request node

  • Update the Set Variables node:

    • notificationEmail: where to send the report

    • daysBeforeExpiry: alert window in days (e.g., 14)

Notes

  • The email table highlights soon-to-expire credentials more prominently (based on remaining days).

  • For automation, replace the manual trigger with a Schedule Trigger (e.g., daily/weekly).

  • The workflow accesses metadata only (names/IDs/expiry), not secret values.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Split Out Applications

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 3 - Set Variables

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 5 - Filter Client Secrets

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.3

Block 6 - Split Out Client Secrets

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 7 - Split Out Certificates

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 8 - Filter Client Certificates

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.3

Block 9 - Build Client Secrets Report

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Build Certificates Report

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 11 - Get EntraID Applications and Secrets

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 12 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 13 - If Expiring Secrets not empty

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 14 - No Operation, do nothing

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 15 - HTML Table with Expiring Secrets

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 16 - Send email

Type / Role
n8n-nodes-base.emailSend - emailSend
Config choices
Version 2.1

Block 17 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Email reports on expiring Microsoft Entra ID app secrets and certificates with Microsoft Graph
Complexity advanced
Nodes 22
Categories DevOps
Author Alexander Schnabl
Published 02 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12399/12399.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Email reports on expiring Microsoft Entra ID app secrets and certificates with Microsoft Graph do?

Monitor expiring EntraID application secrets and notify responsible Stay ahead of credential expirations by automatically detecting Entra ID application client secrets and certificates that are abo...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your DevOps use case.