This tool helps identify inactive users in an Azure AD environment by utilizing Azure CLI to fetch sign-in logs and a Python script to analyze these logs.
- Azure CLI Command: Fetches sign-in activity logs.
az monitor activity-log list --offset 180d --query "[?contains(operationName.value, 'SignIn')]"
- Python Script: Analyzes sign-in logs to determine which users have not been active within a specified number of days.
- Fetch Logs: Use the Azure CLI command provided to download the latest sign-in logs.
- Run Script: Execute the Python script to identify inactive users.
Replace 90 with the number of days to check for user inactivity.
python3 inactive_users.py 90
- Azure CLI installed and configured
- Python 3.x