Skip to content

Add non-Azure hosting support to a365 setup#34

Closed
mengyimicro wants to merge 15 commits intomainfrom
users/mengyixu/NonAzureDeploymentSetup
Closed

Add non-Azure hosting support to a365 setup#34
mengyimicro wants to merge 15 commits intomainfrom
users/mengyixu/NonAzureDeploymentSetup

Conversation

@mengyimicro
Copy link
Contributor

@mengyimicro mengyimicro commented Nov 20, 2025

This change updates the Agent 365 CLI setup flow to support non-Azure deployments (e.g., external/K8s/other cloud hosts) by:

  • Introducing a needDeployment and messagingEndpoint configuration.

  • Allowing blueprint + permissions setup without provisioning Azure App Service resources.

  • Failing early when required non-Azure settings are missing or invalid.

  • Reusing the existing messaging endpoint registration flow with external URLs.

Copilot AI review requested due to automatic review settings November 20, 2025 01:08
@mengyimicro mengyimicro requested review from a team as code owners November 20, 2025 01:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for non-Azure hosting deployments to the Agent 365 CLI setup flow. It introduces a hostingMode configuration that allows users to choose between Azure App Service hosting (default) and External hosting (e.g., Kubernetes, other clouds). The change enables blueprint and permissions configuration without requiring Azure infrastructure provisioning.

Key changes:

  • Added hostingMode and messagingEndpoint configuration properties to support external hosting scenarios
  • Modified validation logic to be conditional based on hosting mode (Azure vs External)
  • Updated setup flow to skip Azure CLI authentication and infrastructure provisioning for non-Azure deployments

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/Microsoft.Agents.A365.DevTools.Cli/Services/A365SetupRunner.cs Added external hosting detection, conditional Azure authentication, and infrastructure provisioning skip logic
src/Microsoft.Agents.A365.DevTools.Cli/Models/Agent365Config.cs Added hostingMode and messagingEndpoint properties with conditional validation and BotName derivation
src/Microsoft.Agents.A365.DevTools.Cli/Commands/SetupCommand.cs Added messaging endpoint validation for non-Azure deployments and conditional endpoint registration logic

Copilot AI review requested due to automatic review settings November 20, 2025 21:34
Copy link
Contributor

Copilot AI left a comment

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

Copilot AI review requested due to automatic review settings November 20, 2025 22:24
Copy link
Contributor

Copilot AI left a comment

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

sellakumaran and others added 4 commits November 20, 2025 15:38
- Added `GraphApiService` as a dependency in `SetupCommand`
  and replaced inline instantiations with dependency injection.
- Introduced `GraphTokenScopeException` to handle disallowed
  high-privilege scopes in Graph tokens.
- Implemented `ValidateGraphToken` in `A365SetupRunner` to
  enforce least-privilege principles during token validation.
- Refactored `GetTokenFromGraphClient` to use `Azure.Identity`
  for token retrieval and validation.
- Added new error code `HighPrivilegeScopeDetected` to
  `ErrorCodes` for better error categorization.
- Updated `Program.cs` to inject `GraphApiService` at runtime.
- Enhanced unit tests to mock `GraphApiService` and ensure
  coverage of new functionality.
- Removed redundant code and improved exception handling
  to exclude `Agent365Exception` from generic catch blocks.
- Performed general code cleanup and added licensing
  information to new files.
@mengyimicro mengyimicro enabled auto-merge (squash) November 21, 2025 01:27
sellakumaran
sellakumaran previously approved these changes Nov 21, 2025
@mengyimicro mengyimicro dismissed sellakumaran’s stale review November 21, 2025 01:52

The merge-base changed after approval.

sellakumaran
sellakumaran previously approved these changes Nov 21, 2025
@mengyimicro mengyimicro dismissed sellakumaran’s stale review November 21, 2025 01:58

The merge-base changed after approval.

sellakumaran
sellakumaran previously approved these changes Nov 21, 2025
@mengyimicro mengyimicro dismissed sellakumaran’s stale review November 21, 2025 02:05

The merge-base changed after approval.

skg-marimuthu
skg-marimuthu previously approved these changes Nov 21, 2025
@mengyimicro mengyimicro dismissed skg-marimuthu’s stale review November 21, 2025 02:48

The merge-base changed after approval.

@mengyimicro mengyimicro enabled auto-merge (squash) November 21, 2025 02:49
@mengyimicro mengyimicro disabled auto-merge November 21, 2025 03:00
tmlsousa
tmlsousa previously approved these changes Nov 21, 2025
@mengyimicro mengyimicro dismissed tmlsousa’s stale review November 21, 2025 03:13

The merge-base changed after approval.

sellakumaran
sellakumaran previously approved these changes Nov 21, 2025
@mengyimicro mengyimicro dismissed sellakumaran’s stale review November 21, 2025 05:41

The merge-base changed after approval.

@rahuldevikar761 rahuldevikar761 enabled auto-merge (squash) November 21, 2025 05:42
@sellakumaran sellakumaran marked this pull request as draft November 21, 2025 05:45
auto-merge was automatically disabled November 21, 2025 05:45

Pull request was converted to draft

@pontemonti pontemonti deleted the users/mengyixu/NonAzureDeploymentSetup branch December 5, 2025 17:27
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