You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve agent registration reliability and UX (#401)
* Improve agent registration reliability and UX
- --agent-registration-only: skip identity/permissions/project-settings steps; fall back to Graph API lookup when agenticAppId is missing; fail with error (not warning) when identity cannot be found
- Bootstrap (--agent-name): merge agentBlueprintId + agenticAppId from generated config, not just agentRegistrationId
- Fix agenticAppId/agenticUserId JSON key casing (camelCase); auto-migrate PascalCase keys in existing files
- Add forceRefresh on Graph token acquisition to bypass WAM cache on 401 retry
- Require AgentRegistration.ReadWrite.All in client app permissions; update tests
New --agent-registration-only summary output:
Agent Registration registered 'My Agent'
Registration ID: a1b2c3...
Agent identity: e5f6a7...
Blueprint: c9d0e1...
When agent identity is not found:
Agent Registration not attempted — agent identity not found
(run 'a365 setup all' to create it first)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix: address PR #401 review comments — scopes, retry, log levels, migration guards
- Add BlueprintOperationScopes (excludes AgentRegistration.ReadWrite.All) to prevent
MSAL consent errors on blueprint operations for apps not yet updated with the permission
- Use BlueprintOperationScopes at 3 BlueprintSubcommand.cs token acquisition call sites
- Fix forceRefresh: false on first registration attempt; true only on retry (via closure)
- Promote agent registration failure summary lines from LogWarning to LogError
- Remove stale AADSTS650053 comments in GraphApiService.cs and AuthenticationConstants.cs
- Remove redundant .Append("AgentRegistration.ReadWrite.All") in SetupHelpers.cs
- Use string.IsNullOrWhiteSpace for all 3 legacy config migration guards in ConfigService.cs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ Agents provisioned before this release need `Agent365.Observability.OtelWrite` g
42
42
### Fixed
43
43
-`setup all --agent-name` re-runs no longer create a duplicate agent registration: the CLI now reads `agentRegistrationId` from `a365.generated.config.json` (when present) and checks for an existing registration before posting a new one.
44
44
-`setup all` now skips agent registration with a clear warning when the agent identity ID is not available, instead of silently sending an invalid request. Retry with `a365 setup all --agent-registration-only` once the identity is ready.
45
+
-`setup all --agent-registration-only` reliability fixes: stored IDs are now correctly read in bootstrap (`--agent-name`) mode; falls back to a Graph API lookup when `agenticAppId` is missing; skips identity, permission, and project-settings steps that don't apply.
45
46
46
47
### Removed
47
48
-`a365 config` command family (`config init`, `config display`, `config permissions`) — replaced by `a365 setup all --agent-name` and `a365 setup permissions custom`.
ctx.Logger.LogError("Agent identity ID is not set in config. Run 'a365 setup all' first to create the agent identity, then retry with --agent-registration-only.");
279
+
ctx.Results.AgentIdentityFailed=true;
280
+
ctx.Results.AgentRegistrationFailed=true;
281
+
ctx.Results.Errors.Add("Agent identity ID not found in config. Run 'a365 setup all' (without --agent-registration-only) to create it first.");
0 commit comments