Share via


Deploy and publish agents

Important

You need to be part of the Frontier preview program to get early access to Microsoft Agent 365. Frontier connects you directly with Microsoft’s latest AI innovations. Frontier previews are subject to the existing preview terms of your customer agreements. As these features are still in development, their availability and capabilities may change over time.

You've built your agent and tested it locally—now it's time to bring it to life in the cloud. Deploying and publishing your agent makes it available across your organization, allowing teams to discover, hire, and interact with it through Microsoft 365.

This guide walks you through deploying your agent code to Azure and publishing it to Microsoft Admin Center, where it becomes a discoverable asset for your organization.

Overview

The deployment and publishing process involves two key steps:

  1. Deploy - Deploy your agent to Azure Web App
  2. Publish - Publishes your agent to the agent store on Microsoft 365 admin center

After you complete these steps, your agent will be available in Microsoft Admin Center where it can be discovered and hired by organizations.

Prerequisites

Before you begin, ensure you have the following:

Required accounts and permissions

  • Azure AD tenant with one of the following roles:
    • Global Administrator
    • Agent ID Administrator
    • Agent ID Developer
  • Azure subscription with contributor access

Required tools

Required setup steps

Before deploying and publishing, ensure you complete these steps in order:

  1. Agent identity created - Complete all steps in Register agents to create your agent blueprint and instance
  2. Agent tested locally - Verify your agent works correctly with Agents Playground (see Test agents locally)
  3. Configuration files ready - Ensure a365.config.json and a365.generated.config.json are up to date

Step 1: Deploy to Azure

The a365 deploy command deploys your agent to the Azure Web App created during setup. This uploads your agent code to Azure, making it available to run in the cloud and handle requests from Microsoft 365.

Deploy agent

Run the deployment command:

a365 deploy

The deploy command for .NET agents:

  • Detects .NET project files (*.csproj, *.fsproj, or *.vbproj)
  • Restores NuGet packages using dotnet restore
  • Publishes application using dotnet publish with Release configuration
  • Creates Oryx manifest with entry point DLL command (for example, dotnet YourApp.dll)
  • Configures Azure runtime based on detected .NET version (default: DOTNET|8.0)
  • Deploys via zip with real-time progress

Warning

Secrets management: When you deploy, environment variables (including API keys and secrets) are stored as Azure App Settings. While environment variables are commonly used for configuration, they are stored in plain text. For production environments, Microsoft recommends using Azure Key Vault for sensitive secrets. For more information, see Safe storage of app secrets in development in ASP.NET Core and Azure Key Vault configuration provider. Never commit .env files with sensitive information to source control.

Verify deployment

After deployment completes:

  1. Navigate to your Web App in Azure Portal
  2. Go to Settings > Configuration to verify App Settings
  3. Check the deployment logs in Deployment Center

Step 2: Publish to Microsoft Admin Center

The a365 publish command publishes your agent to the agent store on Microsoft 365 admin center, making it discoverable and installable. This final step makes your agent available for organizations to hire and use within their Microsoft 365 environment.

Publish agent

Run the publish command:

a365 publish

The publish command:

  • Extracts manifest templates from embedded resources (if manifest folder doesn't exist)
  • Updates manifest.json with agent blueprint ID
  • Pauses for you to customize manifest fields (version, names, descriptions, developer info, icons)
  • Packages app bundle (manifest.zip)
  • Uploads to the agent store on Microsoft 365 admin center
  • Creates federated identity for Teams integration
  • Assigns necessary Graph permissions

Customize manifest

The CLI pauses during publishing to allow you to customize your agent manifest:

=== CUSTOMIZE YOUR AGENT MANIFEST ===

Your manifest has been updated at: [path]\manifest\manifest.json

When you're done customizing, type 'continue' (or 'c') and press Enter to proceed:

Manual steps:

  1. Open manifest.json in your text editor
  2. Customize the required fields:
    • Update version number. Increment from previous if re-uploading.
    • Set meaningful agent name. The names should be equal to or less than 30 characters.
    • Write clear descriptions
    • Update developer information
    • Optionally replace icon files
  3. Save the manifest file
  4. Return to the CLI and type continue or c and press Enter.

Test your deployed agent

After deploying and publishing your agent, you can test it in Microsoft 365 to ensure it works correctly in production. Once deployed, your agent integrates with Microsoft 365 services including Teams (chats, channels, meetings), email, and calendar (send/receive, scheduling), SharePoint and OneDrive (document access, file sharing), and collaboration tools (organizational presence, Planner tasks, document comments).

Important

Agentic users require appropriate Microsoft 365 licenses to access these services. Common licenses include Microsoft 365 E5, Teams Enterprise, and Microsoft 365 Copilot.

View deployed agent in Admin Center

After publishing, your agent appears in Microsoft Admin Center for hiring. It may take some time to propagate.

Navigate to the Microsoft 365 Admin Center - Agents to:

  • View your published agent
  • Manage agent settings
  • Monitor agent usage
  • Configure permissions

Test agent in Teams

After deploying and publishing your agent, you can test it directly in Microsoft Teams:

  1. Open Developer Portal

    • Navigate to Teams Developer Portal
    • Search for your agent by name
    • If you don't have access to this portal, contact your tenant administrator
  2. Configure agent blueprint

    • Set the Agent Type to Bot Based
    • Set the Bot ID from your a365 config display -g output (use the agentBlueprintId value)
    • Save the configuration
  3. Start testing in Teams

    • Open Microsoft Teams using your account
    • Start a new chat with your newly created agentic user
    • Send test messages to verify agent functionality
  4. Example test message

    Send this message to test email functionality (update the recipient email as needed):

    Send an email to recipient@contoso.com with subject "Hello from Teams" and message "This is a test message from my agent!"
    

    The agent should process the request and send the email without requiring more confirmation.

Next steps

Congratulations! Your agent is now live in the cloud and ready to work alongside your teams in Microsoft 365. What started as local code is now a discoverable, enterprise-ready assistant that can be hired across your organization.

As your agent handles real-world requests, consider these next steps:

  • Monitor performance: Use observability features to track agent behavior and optimize responses
  • Add more tools: Explore the tooling catalog to expand your agent's capabilities
  • Iterate and improve: Update your agent code, redeploy, and republish (remember to increment the version number!)
  • Scale across your org: Share your agent's success stories to drive adoption

Your agent's journey from development to deployment is complete—but its impact is just beginning.