Audit your Microsoft 365 Copilot credit spend
Run a read-only script as an administrator, import the file it writes, and see credit balances, spending policies, alerts and per-user consumption for your whole tenant on one page.
GET requests.Data source: Microsoft Graph (beta) Copilot Cost Management API · Browse all API calls
How it works
- 1
Download the collector
PowerShell for Windows or zsh for macOS. Review the embedded source and SHA-256 first.
- 2
Run it as an administrator
Sign in with Global Reader, Billing Administrator or AI Administrator. The script reads, it never writes.
- 3
Import the JSON file
Drop it on this page. Diagnostics lists every Graph call that produced the figures.
A free community project by Copilot Coaching
Built and maintained by Copilot Coaching for Microsoft 365 admins who want a clear view of Copilot spend without installing anything. Not affiliated with Microsoft.
Get the collector scriptCollect a new inventory
Read-only collectors that write the inventory file. They sign in as an administrator and call only GET endpoints of
Copilot Cost Management.
Permissions, roles and options
Delegated Graph permissions (read-only)
- CopilotCostManagement.Read.All
- CopilotCostManagement-Policy.Read.All
- CopilotCostManagement-Assignment.Read.All
- CopilotCostManagement-UserData.Read.All
- GroupMember.Read.All
- User.ReadBasic.All
- User.Read
Uses the Microsoft Graph Command Line Tools app. A Global Administrator may need to grant admin consent once; that consent stays in the tenant after the run and can be removed in Entra (Enterprise applications › Microsoft Graph Command Line Tools › Permissions). The signed-in account needs a role that can read Copilot billing data, for example Global Reader, Billing Administrator or AI Administrator.
Options
| Windows | macOS | Purpose |
|---|---|---|
-TenantId | --tenant | Tenant ID or domain (default: home tenant) |
-UserScope | --user-scope | PolicyMembers (default), AllUsers, None |
-MaxUsers | --max-users | Cap for per-user lookups (default 500) |
-OutputPath | --output | Target JSON file |
-UseDeviceCode | always | Device code sign-in |
CCI_ACCESS_TOKEN | CCI_ACCESS_TOKEN | Env var with an existing token (skips sign-in) |
API reference
All operations of the Microsoft Graph Copilot Cost Management API, with sample requests and responses. Based on the official documentation on Microsoft Learn.
/beta version and is subject to change. Use of these APIs in production applications is not supported.