Agent 365 CLI reference

The Agent 365 CLI reference is a comprehensive command-line interface for building and managing AI agents for Microsoft 365. Learn about how to get started with the Agent 365 CLI.

Global options

All commands support these global options:

  • --version: Show version information.
  • -?, -h, --help: Show help and usage information.

Commands

The following table lists the available commands.

Tip

Each command has specific role requirements. See the individual command reference pages for the minimum role required to execute each command. For example, the setup command requires Azure Contributor + Agent ID Developer at minimum. Global Administrator is required only for OAuth2 permission grants; when a Global Administrator is a different person, a365 setup all prints the next steps they need to complete. For S2S (Server‑to‑Server) agent identity grants (--authmode s2s or both), Agent ID Administrator or higher is required.

Command Description
cleanup Cleans up ALL resources (blueprint, instance, and Azure). Use subcommands for granular cleanup.
cleanup azure Remove Azure resources (App Service, App Service Plan).
cleanup blueprint Remove Entra ID blueprint application and service principal.
cleanup instance Remove agent instance identity and user from Entra ID.
develop Manage MCP tool servers for agent development.
develop add-mcp-servers Add MCP Servers to the current agent configuration.
develop add-permissions Add MCP server API permissions to Microsoft Entra applications for development scenarios where you need to configure custom applications to access MCP servers.
develop get-token Retrieve bearer tokens for testing MCP servers during development using interactive browser authentication.
develop list-available List all MCP servers available in the catalog (what you can install).
develop list-configured List currently configured MCP servers from your local ToolingManifest.json.
develop remove-mcp-servers Remove MCP Servers from the current agent configuration.
develop start-mock-tooling-server Start a mock tooling server for testing and development purposes.
develop-mcp Manage MCP servers in Dataverse environments.
develop-mcp approve Approve an MCP server.
develop-mcp block Block an MCP server.
develop-mcp list-environments List all Dataverse environments available for MCP server management.
develop-mcp list-servers List MCP servers in a specific Dataverse environment.
develop-mcp package-mcp-server Generate MCP server package for submission on Microsoft admin center.
develop-mcp publish Publish an MCP server to a Dataverse environment.
develop-mcp register-external-mcp-server Register an external MCP server with Entra, external OAuth, API key, or no authentication.
develop-mcp unpublish Unpublish an MCP server from a Dataverse environment.
publish Update the ID values in manifest.json and create a manifest.zip package for uploading to the Microsoft 365 admin center.
query-entra Provides options to query Microsoft Entra ID for agent information including scopes, permissions, and consent status.
query-entra blueprint-scopes List configured scopes and consent status for the agent blueprint.
query-entra instance-scopes List configured scopes and consent status for the agent instance.
setup Set up your Agent 365 environment with granular control over each step.
setup all Perform all setup steps to set up your Agent 365 environment
setup blueprint Create agent blueprint (Entra ID application registration).
setup permissions Configure OAuth2 permission grants and inheritable permissions.
setup permissions bot Configure Messaging Bot API OAuth2 grants and inheritable permissions.
setup permissions copilotstudio Configures OAuth2 permission grants and inheritable permissions for the agent blueprint to invoke Copilot Studio copilots via the Power Platform API.
setup permissions custom Applies custom API permissions to your agent blueprint that go beyond the standard permissions required for agent operation.
setup permissions mcp Configure MCP server OAuth2 grants and inheritable permissions.
setup requirements Validate prerequisites for Agent 365 setup.