/get-top-senders-m365

This script will get the top senders of the emails in your Microsoft 365 account inbox.

Primary LanguagePython

get-top-senders-m365

This script will get the top senders of the emails in your Microsoft 365 account inbox.

Prerequisites

  • Python 3.6 or higher
  • Microsoft 365 account with admin privileges
  • Microsoft Azure Application with mail.read permission

Installation

  1. Clone the repository
  2. Install the required packages
pip install -r requirements.txt
  1. Create a new Azure Application with mail.read permission
  2. Create a new file named getfrom.conf and add the following lines:
[DEFAULT]
CLIENT_ID = 
TENANT_ID = 
CLIENT_SECRET = 
RESOURCE = https://graph.microsoft.com
API_VERSION = v1.0
TARGET_USER = 

Usage

  • getfrom.py - Get the top senders of the emails in your Microsoft 365 account inbox and save them to a file
  • report.py - Create a report from the files generated by getfrom.py