Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Agent 365 CLI
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.
Create Agent Identity and Agent User, and add permissions to the identity and licenses to the user. The create-instance command creates agent instances with identities, licenses, and necessary permissions. Use this command to set up complete agent instances, including creating the agent identity, assigning necessary licenses, and granting permissions to the identity.
The create-instance command performs these operations:
- Creates Agent Identity - Registers an agent identity service principal in Microsoft Entra through the Graph API.
- Creates Agent User - Creates an agent user account associated with the identity.
- Assigns manager and sponsor - Sets the current user as manager and sponsor of the agent user and identity.
- Assigns licenses - Assigns the required Agent 365 licenses to the agent user.
Minimum role required: Global Administrator
Note
If you don't have the required Agent 365 licenses to assign yet, you can continue using create-instance identity and then use create-instance licenses afterwards to assign the licenses when you have them.
Syntax
The following shows the syntax for the create-instance command and its optional subcommands.
a365 create-instance [command] [options]
When you run create-instance without a subcommand, it executes both steps in sequence: it creates the agent identity and agent user, then assigns licenses.
Options
Use these options with the create-instance command or the create-instance identity and create-instance licenses subcommands.
| Option | Description |
|---|---|
-c, --config <config> |
Configuration file path (default: a365.config.json) |
-v, --verbose |
Show detailed output |
--dry-run |
Show what would be done without executing |
-?, -h, --help |
Show help and usage information |
Prerequisites
Before running create-instance, ensure that you:
- Completed the Setup agent blueprint step (
a365 setup). - Published your agent by using
a365 publish. - Have a valid
a365.config.jsonanda365.generated.config.jsonin your working directory. - Signed in with an account that has Global Administrator permissions.
create-instance examples
These examples show how to use the create-instance command without subcommands.
Create a full agent instance
Run create-instance without options to create a complete agent instance by using the default configuration.
a365 create-instance
Create with a specific config file
Use the --config option to specify a custom configuration file path.
a365 create-instance --config path/to/a365.config.json
Preview the changes
Use the --dry-run option to see what create-instance would do without making any changes.
a365 create-instance --dry-run
create-instance identity
Create Agent Identity and Agent User, but do not assign licenses.
Use this command to skip the licenses while creating an identity.
Note
If you don't have licenses available yet, use this command so you aren't blocked. You can run create-instance licenses when you have licenses.
a365 create-instance identity
create-instance licenses
Add licenses to an existing Agent User.
Use this command to create the licenses when the identity already exists.
Note
If you used create-instance identity earlier, use this command when licenses are available.
a365 create-instance licenses
Related Agent 365 CLI commands
Use these commands together with create-instance to manage the full lifecycle of your agent.
a365 setup- Set up the agent blueprint and infrastructurea365 publish- Publish your agent to Microsoft 365 admin centera365 deploy- Deploy agent application to Azure (optional)a365 cleanup instance- Remove an agent instance- Create agent instances - Complete guide to creating and testing agent instances