This commit is contained in:
Oli Passey
2024-12-19 18:02:24 +00:00
2 changed files with 53 additions and 1 deletions

18
.env Normal file
View File

@@ -0,0 +1,18 @@
# Azure/SharePoint Credentials
AZURE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
AZURE_CLIENT_SECRET=SECRET
AZURE_TENANT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
EXCEL_FILE_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
USER_EMAIL=x@xx.xxx
# SMTP Settings
SMTP_SERVER=email-smtp.eu-west-1.amazonaws.com
SMTP_PORT=587
SMTP_USERNAME=USER
SMTP_PASSWORD=PASSWORD
FROM_EMAIL=no-reply@domain.tld
FROM_NAME=Azure Secret Expiry Bot
TO_EMAIL=x@xx.xxx
# Teams Webhook Settings
TEAMS_WEBHOOK_URL=your-teams-webhook-url

View File

@@ -1 +1,35 @@
# AzAppRegistrationExpiry
# AzAppRegistrationExpiry
A simple python app to warn of upcoming App Registration Secret / Password Expiry on Azure Entra ID.
## Installation
Requires Python 3.12
Install requirements from requirements.txt
```bash
pip install -r requirements.txt
```
## Usage
Amend the credentials in .env to match your environment.
You will need to create an App Registration with API Permissions:
- Application.ReadWrite.All
- Files.ReadWrite.All
- Sites.ReadWrite.All
- User.Read
- User.Read.All
Create an Excel Sheet within Business OneDrive and add the ID to the .env file (sourcedoc=xxx in the URL)
Add SMTP Sending details to .env (AWS Simple E-Mail Service was used in development)
```python
python main.py
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.