AzureEnumRBAC is a Python CLI tool that enumerates Azure resources, subscriptions, resource groups, role definitions, and role assignments. It also aggregates nested group membership information and produces various CSV/JSON/HTML outputs (like bubble charts for users/roles).
- Automatic login or installation of Azure CLI on Windows
- Enumerates:
- Subscriptions
- Resource groups
- Azure role definitions
- Role assignments
- Aggregates user or group membership data
- Creates final CSV or JSON output plus bubble chart HTML
- Allows partial or full re-runs with a simple orchestrator script
- Python 3.7+ (earlier versions may work, but are untested)
- Azure CLI installed (the tool can install it if not found on Windows)
- Permissions to read Azure subscriptions, role assignments, etc.
If you have a GitHub repository like:
pip install git+https://github.com/PrimitiveContext/AzureEnumRBAC.git
Clone or download this repository, then run:
cd AzureEnumRBAC
pip install .
Once installed, ensure the script directory has been added to PATH and run:
> AzureEnumRBAC
## OR ##
> python -m AzureEnumRBAC.AzureEnumRBAC
You should see the CLI script orchestrating each enumeration phase.
It will create an output/ folder under AzureEnumRBAC/AzureEnumRBAC/
or wherever your code references the output path.
You can modify or re-run phases independently (a_login_or_install, b_get_subscriptions, etc.), or rely on the main CLI to chain them.
Example:
- Log in with
az loginif the CLI isn't installed automatically. - Enumerate subscriptions, role assignments, group memberships.
- View aggregated data in
output/*.jsonoroutput/*.csv. - Generate user or role bubble charts and open them in your browser.
AzureEnumRBAC/
├── AzureEnumRBAC/
│ ├── __init__.py
│ ├── azureEnum.py (main orchestration)
│ ├── a_login_or_install.py
│ ├── b_get_subscriptions.py
│ ├── c_enumerate_resources.py
│ ├── ...
├── pyproject.toml
├── README.md
└── LICENSE
- Fork this repository.
- Create a feature branch for your changes.
- Submit a pull request describing your enhancement.
Distributed under the MIT License. See LICENSE for more details.