operations / skill

Users and Apps Audit

Read-only Microsoft Graph report for users, licenses, app credentials, roles and guests.

At a glance

Purpose
Read-only Microsoft Graph report for users, licenses, app credentials, roles and guests.
Runs in
Local agent with shell
Operating systems
macOS, Linux
Needs
Runtime: Python 3.10+, standard library only; Needs internet: Yes; Needs accounts or API keys beyond your agent: Yes
Files and data
Reads files: Not stated; Writes files: Yes; Sends data to other services: Yes
Tool type
Skill
Delivery
Download from Skills Outpost
Version
0.1.0
ZIP SHA-256
99c89e0e3dcfbcc20ef0cd99129a712cbfda4b750a7586578298c5620d620350
Access
Download from Skills Outpost
Compatibility
Python 3.10 or newer, a command-capable Agent Skills harness, and a Microsoft 365 tenant with a Microsoft Entra ID app registration. Standard library only. Supported platforms: macOS and Linux with POSIX directory-descriptor and no-follow APIs; Windows is unsupported and fails before file or network I/O.
External costs
The package is free under the MIT license. Microsoft 365 licensing and any tenant costs are the user's responsibility; verify current terms with Microsoft.
Permissions
Reads GRAPH_TENANT_ID, GRAPH_CLIENT_ID, GRAPH_CLIENT_SECRET; optional HTTPS_PROXY, https_proxy, NO_PROXY, no_proxy and macOS system proxy settings. Creates only the approved new report relative to a verified directory descriptor at mode 0600. All output directories must exist. Tests read only the acknowledged synthetic fixture (8 MiB limit) and package hygiene files.
Usage terms
MIT license. Copyright 2026 Zero Width Lab. Microsoft 365, Microsoft Graph and Microsoft Entra ID (formerly Azure AD) are Microsoft trademarks. This product is independent of Microsoft. By Zero Width Lab (zerowidthlab.com)

Download from Skills Outpost

Get this version

Free

Version 0.1.0 · Skill package (ZIP) · 66.6 KiB

Static source, format, secret-pattern and declaration checks with independent human source review.

SHA-256 of the released ZIP
99c89e0e3dcfbcc20ef0cd99129a712cbfda4b750a7586578298c5620d620350

The creator shows this version's package files publicly: anyone can read SKILL.md and the other files under Files, without an account. The ZIP download needs the version in your Library (how it works).

Sign in to add this version to your library and follow its creator for free.

Sign in to get free

A creator follow is free, not a paid membership. Your email is not shared with the creator.

Files

Version 0.1.0, shown publicly by its creator, exactly as in this version's ZIP. ZIP SHA-256: 99c89e0e3dcfbcc20ef0cd99129a712cbfda4b750a7586578298c5620d620350. License: MIT (read it).

Each file has its own address. Read one as a web page at https://skillsoutpost.com/agents/users-and-apps-audit-702c32a1/files?path=SKILL.md, or as JSON at https://skillsoutpost.com/api/v1/catalog/users-and-apps-audit-702c32a1/files?path=SKILL.md; replace SKILL.md with any path below.

MITMIT License

Copyright (c) 2026 Zero Width Lab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Version history
  1. Version 0.1.0 Current

    No release notes for this version.

What it does

Users and Apps Audit is a read-only Microsoft Graph report for users, licenses, apps, roles and guests. An agent harness is software that can install the skill, run its Python command and supply environment variables. It needs Python 3.10 or newer on macOS or Linux and Microsoft Graph application permissions in a Microsoft 365 tenant. It is free under the MIT license. This listing delivers the complete package with scripts.

The report counts enabled, disabled and guest users; summarizes prepaid and consumed license units and users per SKU; flags expired or soon-expiring app registration and service principal credentials; lists privileged role members; and lists guests with creation dates. Optional AuditLog.Read.All adds users whose last sign-in attempt is older than the selected window. Required section failures are marked incomplete.

Local file creation is approval-gated: --dry-run prints the full report and a digest bound to the selected/resolved path, directory and parent identities, and content, and --approve with that digest is required to create it. The CLI is read only in Microsoft Graph and uses create-only local writes. Text output escapes untrusted data onto one line. Reports contain personal data and should be handled accordingly.

Who it is for

Microsoft 365 administrators and operators who want a local, read-only inventory and expiry report through an agent harness.

Example tasks

Count enabled, disabled and guest users.
Find application secrets and certificates expiring within 30 days.
Review privileged directory role membership.
Compare subscribed license capacity and assigned users.
List guests and their creation dates.

Getting started

SKILL.md and the scripts can be read without an account: SKILL.md at https://skillsoutpost.com/agents/users-and-apps-audit-702c32a1/files?path=SKILL.md, and the list of every file at https://skillsoutpost.com/agents/users-and-apps-audit-702c32a1/files.

Grant Microsoft Graph application permissions User.Read.All, Directory.Read.All and Application.Read.All with admin consent. Optionally grant AuditLog.Read.All. Set GRAPH_TENANT_ID to a GUID or tenant domain (ASCII letters, digits, hyphens and periods), GRAPH_CLIENT_ID and GRAPH_CLIENT_SECRET in the process environment. Run python3 scripts/users_and_apps_audit.py report --expiring-days 30. For --out, first run the same command with --dry-run, review the full preview and digest, then rerun with --approve DIGEST. Keep credentials out of files and logs.

Limitations

Requires the listed Microsoft Graph application permissions and admin consent. Sign-in activity needs optional AuditLog.Read.All; a 403 there is shown as skipped. A failed required section is marked incomplete and exits 2 unless --allow-partial. Accounts without a sign-in timestamp are not called inactive. Only activated privileged directory roles with the named display values are included. Version 0.1.0 is an early release with no support commitment; fixes and updates ship as new package versions on this listing. No-sign-in uses attempted sign-in timestamps, not successful activity or proof of inactivity. All output directories must already exist; no folders are created. Each fixture and response JSON body is limited to 8 MiB; pagination to 1000 pages per query. Windows is unsupported.

Data practices

The token POST sends tenant identifier in the URL and client ID, client secret, scope and grant type to login.microsoftonline.com. Graph GETs send the bearer access token and query paths to graph.microsoft.com, including role identifiers and same-host pagination paths obtained from Graph responses. Fetched pagination path/query contents are sent as received; display-name and UPN fields are not explicitly resent. Report content is not uploaded. Hostnames are given to the configured system resolver or proxy; no application DNS lookup of fetched user names occurs. Proxy settings may introduce a configured proxy destination. No telemetry. The approval digest binds the selected and fully resolved file path, exact report content, and device/inode identities of the existing destination directory and its parent. Live creation walks the resolved path with no-follow directory descriptors, verifies identities and the selected path resolution, and creates the file relative to the directory descriptor with exclusive/no-follow flags at mode 0600. A swapped parent is refused before writing. All output directories must already exist; no folders are created. Section selection restricts Graph queries, but users, licenses or guests each fetch the full selected users field set for all paginated users; report filters run after those reads. The no-sign-in list uses lastSignInDateTime, which records a sign-in attempt and does not prove successful sign-in or actual inactivity. Named activated roles are a fixed English display-name set; this is an inventory, not a policy evaluation. Remote paths reject dot segments, controls and encoded slash or backslash within a segment before requests.
Report a listing concern

What did you see, and where? Please don't include passwords or keys.

We'll only use it to ask you about this report.