หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
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.
The Agent 365 CLI needs to know your tenant, subscription, and other details to create the required agent resources like Agent Blueprint. The CLI stores this information in a central configuration file called a365.config.json in your working directory. All commands of the CLI use this configuration file.
Prerequisites
Before you begin, ensure you have the following prerequisites:
- Agent 365 CLI - See Agent 365 CLI installation.
Required permissions:
- Valid Microsoft Entra tenant user with one of the following roles:
- Global Administrator
- Agent ID Administrator
- Agent ID Developer
- Access to an Azure subscription with permissions to create resources
Configure the Agent 365 CLI
The a365 config init command creates a365.config.json, the central configuration file used by all Agent 365 CLI commands, in your working directory. The CLI provides an interactive wizard with Azure CLI integration and smart defaults to minimize manual input.
Authenticate with Azure
Before initializing configuration, authenticate with Azure by using the az login command:
az login
Select the appropriate subscription when prompted. The configuration wizard uses Azure CLI to query available subscriptions, resource groups, and app service plans. For the smoothest development experience, set up your tenant user account with the right role and permissions, subscription, and app service plan before starting.
Initialize configuration
Run the a365 config init command to start the interactive configuration wizard:
a365 config init
The wizard uses Azure CLI integration and smart defaults to minimize manual input. You're prompted for:
| Field | Description | Example |
|---|---|---|
| Client App ID | Your custom client app registration ID | 00001111-aaaa-2222-bbbb-3333cccc4444 |
| Deployment project path | Path to your agent project directory | C:\MyAgent\sample-agent |
| Manager email | Email of the manager overseeing this agent | manager@yourtenant.com |
| Azure subscription | Select from available Azure subscriptions | Interactive selection |
| Resource group | Select existing or create new resource group | Interactive selection |
| App Service Plan | Select existing or create new app service plan | Interactive selection |
| Location | Azure region for deployment | eastus, canadacentral |
The wizard automatically generates related resource names (web app, agent identity, blueprint, agent user) and validates your project type.
Learn more about the configuration file structure
Verify Agent 365 configuration files
Agent 365 uses multiple configuration files throughout the development lifecycle:
| File | Purpose | When created | Edit manually? |
|---|---|---|---|
a365.config.json |
User-provided settings | After a365 config init |
Yes |
a365.generated.config.json |
CLI-generated values (agent IDs, resource IDs) | After a365 setup |
No |
.env or appsettings.json |
Runtime environment variables | You create for local development | Yes |
After completing the configuration, verify that you have the following items:
Verify creation of a365.config.json file
Visually verify that the a365.config.json file exists. Or, use the Test-Path PowerShell command in a script to automate this verification.
# Check file exists in current working directory
Test-Path a365.config.json
# Should return: True
Verify a365.config.json configuration data
Run the a365 config display command to view the current Agent 365 CLI configuration.
a365 config display
The output of this command looks like this:
{
"tenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee",
"subscriptionId": "aaaa0a0a-bb1b-cc2c-dd3d-eeeeee4e4e4e",
"resourceGroup": "your-resource-group",
"location": "location-of-your-azure-resources",
"environment": "prod",
"needDeployment": true,
"clientAppId": "00001111-aaaa-2222-bbbb-3333cccc4444",
"appServicePlanName": "your-app-service-plan",
"appServicePlanSku": "service-plan-sku",
"webAppName": "your-web-app",
"agentIdentityDisplayName": "your-agent-name Identity",
"agentBlueprintDisplayName": "your-agent-name Blueprint",
"agentUserPrincipalName": "youragent@yourtenant.onmicrosoft.com",
"agentUserDisplayName": "your-agent-name Agent User",
"managerEmail": "manager@yourtenant.com",
"agentUserUsageLocation": "usage-location",
"deploymentProjectPath": "C:\\path\\to\\your\\project",
"agentDescription": "your-agent-name - Agent 365 Agent"
}
Verification checklist
✅ All fields have valid values (no empty strings or nulls)
✅ tenantId and subscriptionId are valid GUIDs
✅ clientAppId is a valid GUID (your custom client app registration)
✅ resourceGroup and appServicePlanName exist in your Azure subscription
✅ managerEmail uses your tenant domain
✅ deploymentProjectPath points to your agent code directory
✅ agentUserPrincipalName follows the format agentname@tenant.com
✅ environment is set (typically prod)
✅ needDeployment is true for initial setup. If you don't need deployment, learn how to set an agent messaging endpoint.
If your configuration doesn't match the expected output, see the Troubleshooting section for detailed solutions.
Tip
Keep a backup of your a365.config.json file. You can commit it to source control (it doesn't contain secrets).
Next step
If everything checks out, you're ready to proceed.
Troubleshooting
Use these steps to quickly diagnose and resolve common issues with a365.config.json and the Agent 365 CLI.
Configuration file doesn't exist
Symptom: CLI commands fail with "Configuration not found" or Test-Path a365.config.json returns False.
Solution: Create a new a365.config.json file.
Complete the steps to Authenticate with Azure and Initialize configuration.
Missing or invalid configuration values
Symptom: Configuration file exists but has empty fields or validation errors.
Solution: Follow the steps to verify a365.config.json configuration data.
If any field is incorrect:
- Option 1: Rerun the wizard by using the
a365 config initcommand. - Option 2: Manually edit
a365.config.jsonwith correct values.
Invalid tenant or subscription
Symptom: CLI fails with authentication or authorization errors.
Solution:
Use these commands to reauthenticate with Azure, verify the signed-in account, switch to the correct subscription, and reinitialize the Agent 365 CLI configuration.
# Re-authenticate with Azure
az login
# Verify you're logged into the correct account
az account show
# If needed, switch to the correct subscription
az account set --subscription "<subscription-name-or-id>"
# Re-initialize configuration
a365 config init
Custom client app validation fails
Symptom: Configuration wizard fails when validating the custom client app ID.
Solution: Review your custom client app registration to ensure your app registration has all required permissions and admin consent.