Skip to content

A Python-based automation script to monitor Azure AD App Registration secret expirations and send email alerts with an HTML preview.

License

Notifications You must be signed in to change notification settings

Interittus13/AzureSecretPulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AzureSecretPulse

This Python script automates the monitoring of Azure AD App Registration secrets and sends email alerts when they are about to expire.

📊 Feature Preview:

Report Screenshot

Features

  • Fetches App Registrations via Microsoft Graph API.
  • Checks for expiring secrets within a specified threshold.
  • Sends email notifications using SMTP.

📂 Project Structure

azuresecretpulse/
│── src/
│   ├── main.py                        # Main script
│   ├── config.py                      # Configurations
│   ├── email_service.py               # Sends email notification
│   ├── html_renderer.py               # Render HTML reports
│   ├── monitor.py                     # Fetch App Registrations and checks for Expiry Secrets
│── templates/
│   ├── alert.html                     # Email template
│── static/
│   ├── images/
│   │   ├── report_screenshot.png      # HTML alert preview
│── .env                               # Environment variables
│── README.md                          # Project documentation
│── requirements.txt                   # Dependencies

🔧 Setup Instructions

1️⃣ Clone the Repository

git clone https://github.com/Interittus13/azuresecretpulse
cd azuresecretpulse

2️⃣ Install Dependencies

pip install -r requirements.txt

3️⃣ Configure .env File

Create a .env file with your settings:

TENANT_ID=your-azure-tenant-id
CLIENT_ID=your-azure-client-id
CLIENT_SECRET=your-azure-client-secret

EMAIL_FROM=your-email@example.com
EMAIL_TO=test@example.com,test2@yopmail.com
SMTP_SERVER=smtp.office365.com
SMTP_PORT=587
SMTP_PASS=your-password

📊 Running the Script

python -m src.main

📜 License

This project is open-source under the MIT License.

About

A Python-based automation script to monitor Azure AD App Registration secret expirations and send email alerts with an HTML preview.

Topics

Resources

License

Stars

Watchers

Forks