Skip to content

PrimitiveContext/AzureEnumRBAC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AzureEnumRBAC

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).

Table of Contents

  1. Features
  2. Prerequisites
  3. Installation
    1. Install from GitHub
    2. Local Installation
  4. Usage
  5. Repository Structure
  6. Contributing
  7. License

Features

  • 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

Prerequisites

  • 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.

Installation

Install from GitHub

If you have a GitHub repository like:

pip install git+https://github.com/PrimitiveContext/AzureEnumRBAC.git

Local Installation

Clone or download this repository, then run:

cd AzureEnumRBAC
pip install .

Usage

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:

  1. Log in with az login if the CLI isn't installed automatically.
  2. Enumerate subscriptions, role assignments, group memberships.
  3. View aggregated data in output/*.json or output/*.csv.
  4. Generate user or role bubble charts and open them in your browser.

Repository Structure

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

Contributing

  • Fork this repository.
  • Create a feature branch for your changes.
  • Submit a pull request describing your enhancement.

License

Distributed under the MIT License. See LICENSE for more details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages