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)
| File | Size | Uploaded | |
|---|---|---|---|
| azol-0.6.0.tar.gz | 242.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|