# ast microsoft

> Investigate and respond to threats across Microsoft 365, Entra ID, Azure, and Defender using MCP and CLI tools.

ast microsoft is a paid AI agent skill on Agensi by Michael Timpe, in Agents & Orchestration. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $199 (one-time purchase)
- Creator: [Michael Timpe](https://www.agensi.io/creators/michael-timpe)
- Category: [Agents & Orchestration](https://www.agensi.io/skills/agents-orchestration)
- Version: 1.0
- Last updated: 2026-10-23
- Security: scan passed (2026-10-23); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/ast-microsoft
- Tags: ai-agents, api, security, microsoft-365, sentinel, kql, o365, microsoft

## About this skill

Securing and managing Microsoft 365 or Azure environments often requires jumping between multiple portals and running disjointed PowerShell scripts. This skill provides a unified command-line and MCP interface to investigate and respond to threats across the entire Microsoft stack from your agent.

### What it does
- **Security Investigation** queries Entra ID, Defender alerts, and Sentinel incidents using KQL to hunt for threats.
- **Incident Response** disables compromised accounts, revokes sessions, and contains hosts across on-prem AD and Entra.
- **Email Defense** searches mailboxes, analyzes headers, and purges phishing emails or releases items from quarantine.
- **Device & App Management** audits Intune device status, manages the Win32 app catalog, and tracks install status.
- **Compliance & Governance** manages Purview eDiscovery cases, litigation holds, and Teams federation blocks.
- **Resource Optimization** analyzes Azure cost data and identifies VM rightsizing opportunities.

### How it works
1. **Prerequisites** requires the user to create read, write, and compliance app registrations in the Entra portal.
2. **Installation** involves running an `install.sh` script to set up a local Python virtual environment and offline AST packages.
3. **Configuration** uses a `.env` file or system keychain to store API credentials securely.
4. **Execution** leverages specialized CLIs like `az-search`, `az-exch`, and `az-sentinel` or their corresponding MCP tools.

### Frameworks & tools
Built for Python 3.12+, utilizing Microsoft Graph API, Azure Management API, and Sentinel KQL. Certain Exchange and Purview features require PowerShell 7 and the `ExchangeOnlineManagement` module.

### Why this beats prompting it yourself
Generic prompts often hallucinate PowerShell syntax or overlook the complex API permissions required for M365 security actions. This skill provides tested, specific tooling that handles the nuances of Microsoft's various API endpoints while enforcing a strict safety model for destructive actions.

### Use cases
- Disable a compromised user account and revoke all active sessions across Entra and on-prem AD.
- Search all mailboxes for a specific phishing SHA256 hash and purge the messages.
- Query Sentinel for high-severity incidents and pull associated Defender hunting telemetry.
- Audit Azure tenant spend and identify underutilized VMs for cost reduction.

### Known limitations
Does not support Okta, Google Workspace, or sovereign clouds like GCC High and DoD. Write operations require manual environment variable gates to be enabled for MCP access.

## Requires

- Python 3.12+
- Bash 3.2+
- pip
- venv
- requests
- python-dotenv
- platformdirs
- keyring
- fastmcp
- msal 1.24+
- ldap3 2.9+
- Optional: stdio MCP client
- Optional: System keychain
- Optional: PowerShell 7
- Optional: ExchangeOnlineManagement 3.9.0+
- Optional: LDAP(S) access to a domain controller

Windows only via WSL 2 (untested). On Debian/Ubuntu install python3.12-venv. install.sh installs the Python packages. PowerShell is only for Exchange and Purview, LDAP(S) for on-prem AD.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the ast microsoft skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill simplify Microsoft security investigations compared to manual portal management?

This skill consolidates Microsoft 365, Entra ID, Azure, and Defender management into a single interface, eliminating the need to switch between multiple portals or manually debug complex KQL and PowerShell scripts for incident response.

### Which AI agent frameworks and environments are compatible with 'ast microsoft'?

The skill is designed for Python 3.12+ environments and integrates seamlessly with agents supporting the Model Context Protocol (MCP) or standard CLI execution, such as those running on local workstations or secure administrative hosts.

### Does the skill include safety mechanisms to prevent the AI from performing unauthorized destructive actions?

Yes, for security reasons, destructive or 'write' operations like disabling accounts or purging emails require manual environment variable gates to be enabled, ensuring your agent doesn't perform sensitive actions without explicit permission.

### What are the primary steps involved in the installation and configuration process?

Setup involves creating specific Entra ID app registrations for API access, followed by running a provided installation script that configures a local Python environment and the necessary specialized CLI tools.

### What exactly is included in the purchase of this skill?

The package includes the core Python codebase, the specialized CLI tools (az-search, az-exch, az-sentinel), the MCP integration layer, and detailed documentation for setting up the required Azure permissions.

### Are there any specific Microsoft environments or cloud types that are not supported?

While it provides comprehensive coverage for standard Microsoft 365 and Azure global tenants, it currently does not support sovereign clouds such as GCC High, DoD, or third-party identity providers like Okta.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
