M365_Groups_Enum : Enumerate Microsoft 365 Groups In A Tenant With Their Metadata

M365_Groups_Enum is the all_groups.py script allows to enumerate all Microsoft 365 Groups in a Azure AD tenant with their metadata:

  • name
  • visibility: public or private
  • description
  • email address
  • owners
  • members
  • Teams enabled?
  • SharePoint URL (e.g. for Teams shared files)

All of this, even for private Groups! Read more about this on my blog article “Risks of Microsoft Teams and Microsoft 365 Groups”

The reporting.py script will take the JSON output from all_groups.py and generates a CSV files allowing to quickly identify sensitive private or public groups.

Installation

Requirement: 

  • Download the repository
  • Install requirements with

pip install -r requirements.txt

Usage

You will need a valid account on the tenant. Different authentication methods are supported:

  • via login + password (MFA not supported)

python all_groups.py -u myuser@example.onmicrosoft.com -p MyPassw0rd

  • via device authentication, which supports MFA via the browser. Launch then follow instructions

python all_groups.py –device-code

Other methods are also offered. You can read the ROADTools documentation or run the script without any argument to get help.

python all_groups.py

That’s all, you don’t need more options! The script output will be in all_groups.json in the current directory.

Then, if you want a nicer and more concise output from this JSON, use reporting.py to transform it:

python reporting.py

It automatically takes all_groups.json in the current directory, and outputs to all_groups.csv in the same directory.

R K

Recent Posts

LiCo-Extrator : Revolutionizing Icon Extraction Across Platforms

Got it! Below is the updated README.md file with instructions for downloading the project on…

14 hours ago

Termo-Kali : A Guide To Installing Kali Linux On Android via Termux

Termo-Kali bridges the gap between powerful Linux capabilities and the convenience of mobile devices by…

14 hours ago

Certified Ethical Hacker Quiz – Sharpen Your Skills With The CEH v12 Interactive Application

Welcome to the Ethical Hacking Quiz Application, designed to help learners test their knowledge of…

19 hours ago

WPA2 Handshake Automation Tool – A Quick Guide

The WPA2 Handshake Automation Tool is a Python3 script designed to simplify the process of setting up…

19 hours ago

Star-Tup : A Beginner’s Guide To Bash Scripting For Productivity

A custom bash script designed to streamline your startup process and enhance your scripting skills.…

19 hours ago

Cybersecurity Toolkit – Essential Python Tools For Penetration Testing

Welcome to the Cybersecurity Toolkit, a collection of essential Python tools designed for penetration testing…

2 days ago