Skip to content

Commit 7bfd24b

Browse files
gwharris7Grant HarrisCopilot
authored
re-enable create instance (#347)
* re enable create instance + update license * update logging * update SKUs * updated changelog * PR comments * Update CHANGELOG.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix error where admin consent was still required * updated required API permissions * update agent instructions * fixed PR comments * updated changelog * typo * update permission checks and update app name * update instructions * fixed comments --------- Co-authored-by: Grant Harris <grantharris@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 03f2d2e commit 7bfd24b

16 files changed

Lines changed: 412 additions & 557 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
77
## [Unreleased]
88

99
### Added
10+
- Re-enabled `a365 create-instance` command (previously deprecated) — creates agent identity, agent user, and assigns licenses in a single command. The custom client app now requires the `User.ReadWrite.All` delegated permission for user creation and license assignment; existing users may need to update admin consent on their client app.
1011
- `Agent365.Observability.OtelWrite` scope now granted to all provisioned agent identities on the Observability API alongside `user_impersonation`, enabling agents to write OpenTelemetry data to the Agent 365 observability service
1112
- `ChannelMessage.Read.All` and `ChannelMessage.Send` added to default blueprint Microsoft Graph delegated scopes (`agentIdentityScopes`)
1213
- `Files.ReadWrite.All`, `ChannelMessage.Read.All`, and `ChannelMessage.Send` added to default blueprint Microsoft Graph application scopes (`agentApplicationScopes`)
@@ -18,6 +19,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
1819
- `a365 publish` updates manifest IDs, creates `manifest.zip`, and prints concise upload instructions for Microsoft 365 Admin Center (Agents > All agents > Upload custom agent). Interactive prompts only occur in interactive terminals; redirect stdin to suppress them in scripts.
1920

2021
### Fixed
22+
- `A365CreateInstanceRunner` sponsor handling: sponsor is now required (Graph API rejects requests without one) — removed fallback that silently stripped the sponsor on retry, which caused `BadRequest` errors
2123
- Intermittent `ConnectionResetError (10054)` failures on corporate networks with TLS inspection proxies (Zscaler, Netskope) — Graph and ARM API calls now use direct MSAL.NET token acquisition instead of `az account get-access-token` subprocesses, bypassing the Python HTTP stack that triggered proxy resets (#321)
2224
- `a365 cleanup` blueprint deletion now succeeds for Global Administrators even when the blueprint was created by a different user
2325
- `a365 setup all` no longer times out for non-admin users — the CLI immediately surfaces a consent URL to share with an administrator instead of waiting for a browser prompt

docs/agent365-guided-setup/a365-setup-instructions.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ After installing or updating, confirm the CLI is ready by running `a365 -h` to d
5757

5858
### Adapt to CLI version differences
5959

60-
The CLI is under active development, and some commands may have changed in recent versions. The instructions in this prompt assume you have the latest version. If you discover that a command referenced later (such as `publish`) is not recognized, it means you have an older version – in that case, upgrade the CLI. Using the latest version is essential because older flows (e.g. the `create-instance` command) have been deprecated in favor of new commands (`publish`, etc.). If upgrading isn't possible, adjust your steps according to the older CLI's documentation (for example, use the old `a365 create-instance` command in place of `publish`), but prefer to upgrade if at all feasible.
60+
The CLI is under active development, and some commands may have changed in recent versions. The instructions in this prompt assume you have the latest version. If you discover that a command referenced later (such as `publish`) is not recognized, it means you have an older version – in that case, upgrade the CLI. Using the latest version is essential because the CLI evolves rapidly and newer versions include important fixes and new commands (e.g. `create-instance`, `publish`). If upgrading isn't possible, adjust your steps according to the older CLI's documentation, but prefer to upgrade if at all feasible.
6161

6262
### Step 1 completion
6363

@@ -89,25 +89,27 @@ Once the user provides the ID, replace `<CLIENT_APP_ID>` in the command below an
8989
az ad app show --id <CLIENT_APP_ID> --query "{appId:appId, displayName:displayName, requiredResourceAccess:requiredResourceAccess}" -o json && az ad app permission list-grants --id <CLIENT_APP_ID> --query "[].{resourceDisplayName:resourceDisplayName, scope:scope}" -o table
9090
```
9191

92-
From the output of the command above, verify these 5 permissions appear with admin consent. If any are missing or consent is not granted, see "What to do if validation fails" below.
92+
From the output of the command above, verify these 7 permissions appear with admin consent. If any are missing or consent is not granted, see "What to do if validation fails" below.
9393

9494
Required **delegated** Microsoft Graph permissions (all must have **admin consent granted**):
9595

9696
| Permission | Description |
9797
|------------|-------------|
9898
| `AgentIdentityBlueprint.ReadWrite.All` | Manage Agent 365 Blueprints |
9999
| `AgentIdentityBlueprint.UpdateAuthProperties.All` | Update Blueprint auth properties |
100+
| `AgentIdentityBlueprint.AddRemoveCreds.All` | Add and remove credentials on Agent Identity Blueprints |
100101
| `Application.ReadWrite.All` | Create and manage Azure AD applications |
101102
| `DelegatedPermissionGrant.ReadWrite.All` | Grant delegated permissions |
102103
| `Directory.Read.All` | Read directory data |
104+
| `User.ReadWrite.All` | Create agent users, set usage location, and assign licenses |
103105

104106
If the app does not exist, permissions are missing, or admin consent has not been granted, see "What to do if validation fails" below.
105107

106108
**If validation fails** (app not found, permissions missing, or no admin consent):
107109

108110
1. STOP — do not proceed to run any `a365` CLI commands.
109111
2. Inform the user the custom client app registration is missing or incomplete.
110-
3. Direct the user to the official setup guide: register the app, configure as a Public client with redirect URI `http://localhost:8400`, add all five permissions above, and have a Global Admin grant admin consent.
112+
3. Direct the user to the official setup guide: register the app, configure as a Public client with redirect URI `http://localhost:8400`, add all seven permissions above, and have a Global Admin grant admin consent.
111113
4. Wait for the user to confirm the app is properly configured, then re-run the same validation command above.
112114

113115
Save the `clientAppId` value — it will be used automatically in Step 3 (do NOT ask the user for it again).

0 commit comments

Comments
 (0)