Microsoft Graph API App Secret & Certificate Expiry Scanner in PowerShell & Python | LoveSharePoint
1. Executive Summary & Problem Analysis
Enterprise daemon jobs, scheduled sync scripts, and third-party SaaS integrations rely heavily on Microsoft Entra ID App Registrations authenticated via client secret strings or X.509 public certificates. Because Microsoft Entra ID does not send native, granular push notifications for upcoming credential expiration down to administrative inboxes, credentials silently expire in production. This leads to catastrophic outage spikes: overnight data pipelines halt, automated SharePoint synchronization fails, user provisioning freezes, and emergency rotations bypass security change control baselines.
A dual-engine enterprise credential scanner built in PowerShell 7 (leveraging Microsoft.Graph.Applications) and Python 3.11 (leveraging MSAL and Microsoft Graph REST v1.0). The engine scans all tenant App Registrations, inspects the EndDateTime timestamp of every PasswordCredential and KeyCredential, flags items expiring within 30 days, generates an executive HTML telemetry report, and triggers instant alerts via webhook and email before production disruption can occur.