Skip to content

goodworkaround/LCWMermaidGenerator

Repository files navigation

LCWMermaidGenerator

A PowerShell module that connects to Microsoft Graph and generates comprehensive Markdown reports with embedded Mermaid flowchart diagrams for all Entra ID Identity Governance Lifecycle Workflows in your tenant.

Prerequisites

  • PowerShell 7.1 or later (Core edition)

  • Microsoft.Graph PowerShell SDK — install it from the PowerShell Gallery:

    Install-Module Microsoft.Graph -Scope CurrentUser
  • An Entra ID account with one of the following permissions:

    • LifecycleWorkflows.Read.All
    • LifecycleWorkflows.ReadWrite.All

Installation

From the PowerShell Gallery (recommended)

Install-Module LCWMermaidGenerator -Scope CurrentUser

From source

git clone https://github.com/goodworkaround/LCWMermaidGenerator.git
Import-Module ./LCWMermaidGenerator -Force

Usage

1. Connect to Microsoft Graph

Connect-MgGraph -Scopes 'LifecycleWorkflows.Read.All'

2. Run the generator

# Generate a report at the default location (LifecycleWorkflowsReport.md in the current directory)
Invoke-LCWMermaidGenerator

# Generate a report at a custom path
Invoke-LCWMermaidGenerator -ReportPath 'C:\Reports\MyWorkflowsReport.md'

Full example

# Import the module (skip if installed from the Gallery)
Import-Module "./LCWMermaidGenerator" -Force

# Authenticate
Connect-MgGraph -Scopes 'LifecycleWorkflows.Read.All'

# Generate the report
Invoke-LCWMermaidGenerator -ReportPath './LifecycleWorkflowsReport.md'

Parameters

Parameter Type Required Default Description
-ReportPath String No LifecycleWorkflowsReport.md Path where the Markdown report file will be written.

Output

Running Invoke-LCWMermaidGenerator produces:

  1. Console output — a human-readable text summary of every workflow, including trigger, scope, and task details.
  2. Markdown report file — a structured .md file containing:
    • A metadata table per workflow (ID, display name, category, enabled status, created/modified dates).
    • A numbered task list with task definitions and all configured arguments.
    • An embedded Mermaid flowchart diagram visualizing the workflow execution path with color-coded nodes:
      • 🔵 Dark blue — workflow entry node
      • 🟢 Light green — enabled tasks
      • ⚫ Gray dashed — disabled tasks
      • 🟠 Orange — custom Logic App extension tasks
      • 🟢 Light green — trigger / scope metadata nodes

The report can be rendered in any Markdown viewer that supports Mermaid (e.g. GitHub, VS Code with the Markdown Preview Mermaid Support extension, or Obsidian).

License

This project is licensed under the MIT License.

About

A module for generating mermaid diagrams for Life Cycle Workflows

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors