Skip to content

Use first-party Agent 365 CLI app for setup - #489

Merged
Krishnadheeraj (DheerajPannala) merged 4 commits into
microsoft:mainfrom
DheerajPannala:kpannala-microsoft-first-party-setup-mode
Aug 27, 2026
Merged

Use first-party Agent 365 CLI app for setup#489
Krishnadheeraj (DheerajPannala) merged 4 commits into
microsoft:mainfrom
DheerajPannala:kpannala-microsoft-first-party-setup-mode

Conversation

@DheerajPannala

@DheerajPannala Krishnadheeraj (DheerajPannala) commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • default setup and bootstrap to the Microsoft-managed Agent 365 CLI client ID
  • resolve the first-party identity through tenant service principals and preserve the tenant-owned custom-app fallback
  • validate first-party authorization from acquired token scp claims without modifying Microsoft’s application registration or requiring a tenant-local CLI consent grant
  • use WAM on native Windows and device code in WSL, macOS, and Linux, avoiding unsupported localhost browser-response flows for the first-party app
  • preserve configured custom apps when Graph lookup failures are inconclusive
  • add regression coverage for bootstrap, token validation, mutation guards, cross-platform authentication routing, and custom-app compatibility

Validation

  • dotnet test src\tests.proj --configuration Release --no-restore -p:NuGetAudit=false — 1,994 passed, 12 skipped
  • authentication regression suite — 105 passed
  • manual first-party requirements validation succeeded in two tenants with zero tenant-local CLI oauth2PermissionGrant records
  • manual OBO setup completed with 4 of 4 resources reporting effective inheritance

Default setup to the Microsoft-managed Agent 365 CLI service principal, validate delegated scopes from acquired tokens, and keep custom-app fallback behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 17, 2026 14:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Route the Microsoft-managed CLI app through device code when WAM is unavailable while preserving custom-app browser authentication.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 21, 2026 16:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 36 changed files in this pull request and generated 2 comments.

Comment thread src/Microsoft.Agents.A365.DevTools.Cli/Services/IConfigService.cs
Comment thread CHANGELOG.md Outdated
Describe the observed AADSTS70007 system-browser incompatibility without inferring home-tenant redirect configuration from customer service-principal metadata.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 21, 2026 17:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 36 out of 36 changed files in this pull request and generated no new comments.

Suppressed comments (2)

Previously missed (2) — in code that hasn't changed since the last review.

src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigService.cs:570

  • User-facing logs should avoid non-ASCII punctuation; the em dash here can render inconsistently across terminals. Use a plain hyphen instead.
                _logger?.LogWarning("Configured clientAppId '{Id}' in a365.config.json is not a valid GUID — ignoring.", configuredId);

src/Microsoft.Agents.A365.DevTools.Cli/Services/GraphApiService.cs:206

  • User-facing logs should avoid non-ASCII punctuation; the em dash in this message can render inconsistently across terminals. Prefer a plain hyphen.
            _logger.LogDebug("Cannot acquire an access token for client app {ClientAppId} — no token provider configured.", clientAppId);

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings August 27, 2026 11:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

@DheerajPannala
Krishnadheeraj (DheerajPannala) merged commit ea1579f into microsoft:main Aug 27, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants