AI-Offboard
Find unwanted AI access. Clean it up with proof.
SMBs and MSPs need a reliable inventory of the AI applications connected to a
tenant, the data those applications can reach, and proof that unwanted access
was removed. ai-offboard focuses on that tenant-side cleanup workflow with a
read-only-first scanner, an approval-gated remediation path, and a
before-and-after evidence artifact.
Read-only by default. The scanner never writes: it audits and reports, and its plan is a dry-run checklist for a human to approve. Remediation (
offboard execute) is opt-in, behind an explicit approval gate, and logs every mutation to an audit trail.
What it does
- Enumerates users, enterprise applications, and actual app-role assignments in a Microsoft 365 tenant
- Maps catalog-matched AI apps to their assigned users/groups/service principals, role scopes, and DLP-risk tiers
- Attributes delegated and application OAuth permissions to readable client and resource applications where Graph provides that evidence
- Flags risky tenant-side AI access: disabled-account assignments, high-tier app access, unknown or unapproved apps, and broad OAuth grants from catalog-matched AI applications
- Emits a dry-run AI access cleanup plan (execute nothing)
- Renders a plain-English audit report (.md + .html) an auditor can read
Quick start
Install
pip install "ai-offboard[web]" # from PyPI
# or from source: pip install -e ".[web]"
Try the demo now (no Azure required)
offboard web # local web UI, then click "Run demo scan"
offboard audit --tenant demo --mock # or a terminal report
The web UI is loopback-only by default. For a tailnet/reverse-proxy deployment, use explicit host opt-in plus a token:
set OFFBOARD_WEB_TOKEN=<long-random-token>
offboard web --host <tailnet-ip>
Put remote mode behind HTTPS or Tailscale Serve. It is operator-token protected, but the development server should never be exposed directly to the public internet.
Connect your tenant (interactive, recommended)
One command — no App Registration, no tenant ID, no client secret. Sign in as a Global Administrator via Microsoft's device code flow; the tenant ID is automatically detected from the token:
offboard auth login # copy the code → microsoft.com/devicelogin → done
offboard audit # scan your tenant
On subsequent runs the cached token is reused silently.
Connect your tenant (CI / service account)
For automation, still supports client credentials via an Azure App Registration:
offboard setup # guides through App Registration + writes .env
offboard audit --tenant <id> # scan to terminal
offboard audit --tenant <id> --report # write report.md + report.html
offboard plan --user <upn> # dry-run AI access cleanup plan (executes nothing)
AI access policy engine
Turn the inventory into AI-access cleanup policy. Policies are declarative YAML using named checks only (no arbitrary expressions, so opening a policy file never executes code). The bundled baseline ships four AI-access policies:
offboard policy list # see checks + bundled policies
offboard policy check # scan tenant, evaluate policy, exit 0 on PASS / 2 on FAIL
offboard policy check --json # machine-readable compliance report
Bundled policies:
- AI-001 No disabled-account AI access
- AI-002 No high-privilege AI app assignments
- AI-003 No broad AI OAuth grants
- AI-004 Approved AI-app allowlist
Sign-in activity is optional context. It is not collected by default and does not
affect core AI-access findings. Use offboard audit --sign-in-context only when
that enrichment is useful and licensed.
Bring your own policies: drop a .yml file into offboard/policies/default/
(or pass a path to the loader) with the same policies: structure.
Power features
Execute remediation (v2 — writes to the tenant)
offboard execute turns the audit findings into real actions, behind an
explicit approval gate. Every mutation is appended to the local audit log:
offboard plan --tenant <id> # review what will change (read-only)
offboard execute --tenant <id> # approve each step, then it applies:
# remove assignments, revoke tokens, disable accounts where approved
Use --yes to skip the interactive confirmation (CI/automation), and
--target <upn-or-app> to limit execution to one subject.
Scheduled recurring audits
offboard schedule add <tenant-id> --interval weekly # daily | weekly | monthly
offboard schedule list
offboard schedule run-due # drive from cron / Task Scheduler (offboard schedule run-due)
Reports are written to reports/ and emailed when SMTP is configured
(OFFBOARD_SMTP_HOST, OFFBOARD_SMTP_PORT, OFFBOARD_SMTP_USER/PASS,
OFFBOARD_MAIL_FROM, OFFBOARD_MAIL_TO).
Multi-tenant (MSP mode)
offboard tenant add <tenant-id> --name "Acme Corp"
offboard tenant list
offboard audit --all # sweep every registered tenant into a matrix
Trend comparison
offboard audit --tenant <id> # scan + auto-save (twice for a trend)
offboard report --compare # diff the last two scans: new vs resolved findings
offboard report --last # re-render the last saved scan
Exports
offboard audit --json # findings as JSON to stdout
offboard audit --csv # findings to ai-offboard-findings.csv (MSP tooling friendly)
offboard audit --report # markdown + html report files
offboard audit --bundle evidence/tenant-audit.zip
# complete evidence bundle: reports, snapshot,
# findings, coverage metadata, and checksums
The evidence bundle contains tenant and principal identifiers. Treat it as
confidential customer evidence. Its manifest.json records the scan counts,
coverage status, package version, and SHA-256 hashes for the included artifacts.
Google Workspace
export GOOGLE_SERVICE_ACCOUNT_JSON=/path/to/service-account.json
export OFFBOARD_GOOGLE_ADMIN="admin@yourdomain.com"
offboard audit --workspace # reads users + their OAuth-connected AI apps
The Workspace connector maps each user's granted third-party apps (ChatGPT, Fireflies, Zapier, …) into the same AI-access rules as the Entra connector. The scanner reports tenant-side connected or authorized applications. It does not claim to find every desktop application, browser extension, or personal SaaS account.
Screenshots
Landing page — run a live scan or a one-click demo (no Azure required):
Audit report — stat cards, AI app inventory with DLP-risk tiers,
per-finding remediation steps, and .md / .html downloads:
Reproduce with offboard web then python scripts/capture_screenshots.py.
Sample output
Run offboard audit --tenant demo --mock (or the web UI) to see a live report.
A representative report renders like this:
# AI-Offboard AI Access Report
- **Tenant:** demo
- **Principals scanned:** 3
- **App assignments:** 2
| Severity | Rule | Subject | Evidence |
| --- | --- | --- | --- |
| medium | R1 | disabled@example.com | Disabled account may retain connected AI access. |
| high | R4 | Microsoft 365 Copilot | High-privilege app has an active assignment. |
v1 scope
- Two auth modes: interactive device-code login (
offboard auth login, no tenant ID needed) or client credentials (CI/service accounts via App Registration). - Read-only Microsoft Entra ID connector (Graph, GET-only)
- AI-app catalog (
apps.json) with DLP-risk tiers - Risk rules → findings (disabled-account access, high-tier assignments, unknown apps, broad grants from catalog-matched AI apps)
- Dry-run AI access cleanup plan + audit report (MD + HTML)
- Local web UI (
offboard web) with "Connect Microsoft 365" flow - Mock/demo mode (
--mock) so anyone can evaluate with zero creds
Not in v1: write/execute cleanup, Google Workspace connector, DB, multi-tenant SaaS. See SPEC.md for the roadmap.
Install
# Core CLI (no web UI)
pipx install . # or: pip install -e .
# With the local web UI
pip install -e ".[web]"
Requires Python 3.11+. The wheel ships the app catalog and web templates, so
a normal pip install is whole (4 data files verified in the built wheel).
Contributing
The fastest way in is a one-PR apps.json catalog entry. See
CONTRIBUTING.md.
Security
Read-only by design; v1 makes zero mutating Graph calls. See SECURITY.md.
License
Apache-2.0. See LICENSE.
Metadata
Release files for ai-offboard 0.4.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ai_offboard-0.4.6.tar.gz | 83.0 kB | Without provenance | Details for ai_offboard-0.4.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ai_offboard-0.4.6-py3-none-any.whl | Python 3 | none | any | Details for ai_offboard-0.4.6-py3-none-any.whl |
Total release size: 166.1 kB
Release files / ai_offboard-0.4.6.tar.gz
| Download URL | ai_offboard-0.4.6.tar.gz |
|---|---|
| Size | 83.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ef1b13c264781eb53c0a056aa774d92fde827f0da3a7093a8aab363cb4cf6d92
|
|
BLAKE2b-256 checksum How to use checksums |
e477b311f861369633e29352980d0a2eb42df321411e1c13b8c16b05d21d858e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / ai_offboard-0.4.6-py3-none-any.whl
| Download URL | ai_offboard-0.4.6-py3-none-any.whl |
|---|---|
| Size | 83.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cc257ce37c69eea44f644d4214ec32e41e13cffc57f0de7554b47ac75496e13
|
|
BLAKE2b-256 checksum How to use checksums |
1525a190fd451a50208c1b6ae4db31f66800dcb24f762e90c4b24f59db7c68f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for ai-offboard 0.4.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.