purview-audit

purview-audit is a skill for Claude Code, Codex from vinayaklatthe/microsoft-security-skills. It costs 112 tokens per session (1,212 once invoked), scanned A, original, MIT.

Guidance for Microsoft Purview Audit, which records and searches user and administrator activity across Microsoft 365. It supports security investigations, digital forensics, compliance work, and regulatory logging.

In plain words
What is it for?
Use it to choose an audit tier, search activity, investigate incidents, support eDiscovery and compliance, and send Microsoft 365 audit data to Microsoft Sentinel for longer-term analysis.
Why use it?
After an incident, teams need evidence of what happened and who performed an action. This helps ensure the right events and retention period are available before an investigation begins.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to choose an audit tier, search activity, investigate incidents, support eDiscovery and compliance, and send Microsoft 365 audit data to Microsoft Sentinel for longer-term analysis.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vinayaklatthe/microsoft-security-skills/purview-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vinayaklatthe/microsoft-security-skills --skill purview-audit
Clone the repo
git clone --depth 1 https://github.com/vinayaklatthe/microsoft-security-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for purview-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/vinayaklatthe/microsoft-security-skills/purview-audit/github.svg)](https://agentmods.dev/skills/vinayaklatthe/microsoft-security-skills/purview-audit)
Your own site
<a href="https://agentmods.dev/skills/vinayaklatthe/microsoft-security-skills/purview-audit"><img src="https://agentmods.dev/badge/skills/vinayaklatthe/microsoft-security-skills/purview-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for purview-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/vinayaklatthe/microsoft-security-skills/purview-audit"><img src="https://agentmods.dev/badge/skills/vinayaklatthe/microsoft-security-skills/purview-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,212 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00112 $0.01212
Opus 5 $0.00056 $0.00606
Sonnet 5 $0.00022 $0.00242
Haiku 4.5 $0.00011 $0.00121

Measured 9d ago against content hash 8ba646f19a6b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

purview-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/purview-audit/SKILL.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Microsoft Purview Audit

Microsoft Purview Audit records user and admin activity across Microsoft 365 services and makes it searchable for security investigations, forensics, and compliance. It's the first thing the IR team reaches for and the first thing leadership wishes they had configured better.

When to use

Investigating incidents, supporting eDiscovery/compliance, and meeting regulatory logging requirements for Microsoft 365 services.

Do not use this skill for sign-in/identity logs (use Entra ID sign-in logs / Defender XDR) or for Azure resource activity (use Azure Activity Log via Sentinel).

Pick the right tier and retention

Need Tier Retention
Core admin/user actions for routine ops Audit (Standard) ~180 days default
Breach investigation (MailItemsAccessed, Send, SearchQueryInitiated) Audit (Premium) 1 year default
Regulated industries / legal hold scenarios Audit (Premium) + 10-year add-on Up to 10 years
Long-term SIEM/UEBA correlation Stream to Sentinel via Office 365 connector Sentinel retention

Rule of thumb: confirm tier and retention before an incident - default retention is the single most common gap that turns a "we have audit logs" into "we don't have the right ones".

Approach

  1. Confirm tier - Audit (Standard) provides core logging with default retention; Audit (Premium) adds longer default retention (1 year, extendable to 10 with add-on), higher bandwidth, and access to crucial/high-value events (e.g., MailItemsAccessed, Send, SearchQueryInitiated) valuable for forensics. Verify: a sample query for MailItemsAccessed returns results for a known user.
  2. Verify auditing is on - Confirm audit logging is enabled for the tenant (it should be on by default in modern tenants but old tenants can have it disabled). Verify: Get-AdminAuditLogConfig / portal shows audit ingestion active.
  3. Configure retention policies - Audit log retention policies extend or shorten retention for specific record types/workloads/activities; build them around your top investigation playbooks. Verify: retention policies cover MailItemsAccessed, FileAccessed, SearchQueryInitiated for executives at minimum.
  4. Search - Use Audit search in the Purview portal (or the Office 365 Management Activity API / Microsoft Graph audit API) to query by user, activity, workload, and time. Verify: a test investigation query returns within the SLA expected for audit search.
  5. Operationalise - Stream audit data to Sentinel/SIEM for correlation and long-term analytics; document the playbooks investigators use. Verify: the Office 365 connector in Sentinel shows ingestion and a workbook is in place.
  6. Practice - Run a tabletop using the audit log to answer "who exfiltrated what when"; note any gap in retention or premium events.

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 89 lines · 112 tokens per session scan A 8ba646f19a6b

Subscribe to this mod's changes

purview-audit is a skill published in the GitHub repository vinayaklatthe/microsoft-security-skills (173 stars, last pushed 2mo ago), licensed MIT. It adds 112 tokens to every session and 1,212 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

rfp-response-compliance-review

Reviews a draft proposal against the firm's configurable compliance rules — prohibited language, required disclosures, role and positioning boundaries, and procurement-submission requirements. Logs all findings to the Review Findings SharePoint list and annotates the draft document for salesperson and reviewer…

pnp/sharepoint-skills · 57 tokens

power-automate

Use when operating Microsoft Power Automate cloud flows from code — create, enable, update, list or delete via the Dataverse Web API (workflow table, category 5) with Entra ID OAuth2, plus run-history debugging. NOT designing the flow definition (that is automation-flows), NOT picking a platform by billing model (that…

ericrisco/rsc-harness · 82 tokens

carta-witness-signatures

Status of witness and spousal-consent signature requests on option grants, RSAs, PIUs — who still needs to sign, and what's awaiting signature, signed, or expired. Covers one award, one company, or a whole portfolio. Read-only.

carta/plugins · 58 tokens

carta-hmrc-limits

Report a UK company's HMRC EMI/CSOP limit usage. Use when asked how much EMI allowance is left, whether the company is near the £6m EMI limit, who is close to or over their £250k individual limit, CSOP headroom, or whether a planned grant fits.

carta/plugins · 68 tokens

carta-interaction-reference-core

The non-negotiable half of Carta's AI agent interaction rules — financial precision, data provenance, the AI-computation gate, how to confirm, and trust & safety. Loaded ONCE per conversation, before any response that presents or writes Carta financial data. Sufficient on its own for write flows; a flow that also…

carta/plugins · 88 tokens

compliance-verifier

Use this agent to validate deployments against GDPR, HIPAA, SOC2, and other regulatory compliance frameworks and generate audit reports.

samibs/skillfoundry · 30 tokens