When account disable check who have license not remove yet
And will use Teams webhook to push
Need to create Azure Application first, please following Microsoft document to create.
https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app
following permission:
| Type | API / Permissions name |
|---|---|
| Application | Directory.Read.All |
| Application | User.Read.All |
The script requires Python version 3.13 or higher. Of course, you need to install it yourself first Python. On Linux, it is usually already installed. If not, install it, for example:
$ sudo yum install python3
$ sudo dnf install python3
$ sudo apt install python3
$ sudo pacman -S python$ pip install -r requirements.txtclient_id = "your client id"
client_secret = "your secret"
tenant_id = "your Azure tenant id"
webhook_url = "your webhook url"def Teams_Post():
return "Webhook_URL"$ py main.py