Skip to main content

Azure Offensive Library

A python-based pentesting library for Azure and Entra ID

Installation

Install the library using Python3 pip:

pip install azol

For maintainers: see RELEASING.md for the tag-based PyPI release process.

API docs (GraphClient reference) can be built with:

pip install -e ".[docs]"
mkdocs serve

Offline GraphClient tests (from repo root, with the package importable):

pip install -e .
python -m unittest discover -s tests
python scripts/check_graph_docstrings.py

Live tenant tests are opt-in; see tests/graph/live/README.md.

Basic Usage

Log in as a user and get all subscriptions:

from azol.credentials import User
from azol.clients import ArmClient

cred = User(username="user@domain.com")
arm_client = ArmClient(tenant="tenant.com", cred=cred)

subscriptions=arm_client.get_subscriptions()

for sub_id in subscriptions:
  print(sub_id)

Log in as a Service Principal and get all groups, with owners

from pprint import pprint
from azol.credentials import ServicePrincipal
from azol.clients import GraphClient

cred = ServicePrincipal(client_id="00000000-0000-0000-0000-000000000000", client_secret="your secret" )

graph_client = GraphClient(tenant="tenant.com", cred=cred)

groups=graph_client.get_all_groups_and_owners()

for group in groups:
  pprint(group)

Log in as a user to their default tenant, but use an interactive signin. Get all tenants the user belongs to.

from azol import *

cred=User("user@domain.com")
arm_client=ArmClient(cred=cred, oauth_flow="authorization_code")

tenants=arm_client.get_tenants()

for tenant in tenants:
  print(tenant["defaultDomain"])

Release files for azol 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for azol 0.6.0
File Size Uploaded
azol-0.6.0.tar.gz 242.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for azol 0.6.0
File Interpreter ABI Platform
azol-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 504.0 kB

Release files / azol-0.6.0.tar.gz

Download URL azol-0.6.0.tar.gz
Size 242.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fd72fa738e7f821322989ce2a6f24c62a42c4f33e4be7a16885e48218057fce2
BLAKE2b-256 checksum
How to use checksums
304ad1865e5684acaca48184fd9d6d4aa90ec99a5f4e93baf914e59e2820575f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / azol-0.6.0-py3-none-any.whl

Download URL azol-0.6.0-py3-none-any.whl
Size 261.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fccbbe1ac3afb9fdb9baa70c59a98b8830e2647fce2e50f5655ce872a2239bd7
BLAKE2b-256 checksum
How to use checksums
641ac00f338a997b7526c468279c4ee5e03fbc21463011e9e90c74482ebebaea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.0

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page