Skip to content

Add cloud-aware authority/graph endpoint resolution - #478

Open
Rick Brighenti (rbrighenti) wants to merge 4 commits into
mainfrom
feature/cloud-agnostic-endpoints
Open

Add cloud-aware authority/graph endpoint resolution#478
Rick Brighenti (rbrighenti) wants to merge 4 commits into
mainfrom
feature/cloud-agnostic-endpoints

Conversation

@rbrighenti

@rbrighenti Rick Brighenti (rbrighenti) commented Jul 24, 2026

Copy link
Copy Markdown

Summary

Makes Graph, OAuth authority, and Agent 365 Tools endpoints cloud-agnostic so the CLI works in sovereign/government clouds in addition to commercial.

  • Cloud-specific Graph, authority, and Agent 365 Tools overrides now apply across setup, consent, authentication, query, and create-instance flows.
  • Arbitrary cloud names resolve via normalized environment-scoped variables (e.g. A365_GRAPH_BASE_URL_GCC_HIGH).
  • Configured endpoints are normalized and validated to HTTPS origins (no path/query/fragment/user-info).
  • Commercial cloud (https://login.microsoftonline.com, standard Graph base URL) remains the default fallback.

Testing

  • Added unit tests for ConfigConstants endpoint resolution/normalization and updated affected service/command tests.

Copilot AI review requested due to automatic review settings July 24, 2026 16:00

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.

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.

Normalize cloud keys for environment overrides and route consent/token/Graph URL generation through cloud-aware helpers so arbitrary cloud names can be configured without code changes

Make client-credential token authority cloud-aware
@rbrighenti
Rick Brighenti (rbrighenti) force-pushed the feature/cloud-agnostic-endpoints branch from 84723d1 to c0d736c Compare July 24, 2026 16:09
Copilot AI review requested due to automatic review settings July 24, 2026 16:09

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.

@github-actions github-actions Bot added documentation Improvements or additions to documentation feature labels Jul 24, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

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 43 out of 43 changed files in this pull request and generated 3 comments.

Comment thread src/Microsoft.Agents.A365.DevTools.Cli/Services/MsalBrowserCredential.cs Outdated
Comment thread CHANGELOG.md Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 27, 2026 09:53

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 43 out of 43 changed files in this pull request and generated 3 comments.

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 43 out of 43 changed files in this pull request and generated 2 comments.

Comment thread src/Microsoft.Agents.A365.DevTools.Cli/Services/InteractiveGraphAuthService.cs Outdated
Comment thread src/Microsoft.Agents.A365.DevTools.Cli/Services/BootstrapConfigResolver.cs Outdated
- InteractiveGraphAuthService: append /v1.0 to the cloud-specific Graph
  BaseUrl so overriding RequestAdapter.BaseUrl doesn't drop the API
  version segment and 404 every request; add regression test.
- BootstrapConfigResolver: pass the caller's CancellationToken into the
  'az cloud show' invocation so bootstrap can be cancelled.

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

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 44 out of 44 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/Microsoft.Agents.A365.DevTools.Cli/Services/Internal/MicrosoftGraphTokenProvider.cs:337

  • PowerShell fallback builds Connect-MgGraph -Scopes from validatedScopes, which are now normalized to fully-qualified URIs (e.g. https://graph.microsoft.com/User.Read). In this repo, PowerShell guidance consistently uses bare scope names (e.g. User.Read, Application.Read.All), and Connect-MgGraph commonly expects those. This risks breaking the PowerShell fallback path for commercial clouds when MSAL is unavailable/fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants