Skip to content

Add deploy scopes subcommand#27

Merged
sellakumaran merged 4 commits intomainfrom
users/sellak/deployscopes
Nov 19, 2025
Merged

Add deploy scopes subcommand#27
sellakumaran merged 4 commits intomainfrom
users/sellak/deployscopes

Conversation

@sellakumaran
Copy link
Contributor

a365 deploy scopes - Grant or update OAuth2 scopes for a specific resource app ID on the agent blueprint.

Simplified the `deploy` command to focus solely on application deployment. Introduced new subcommands: `a365 deploy scopes` for non-mcp scopes. Updated the README to document these changes and the new flags (`--dry-run`, `--inspect`, `--restart`, `--verbose`).

Enhanced error handling with `DeployMcpException` and `DeployScopesException` for structured diagnostics. Added new error codes for `mcp` and `scopes` deployment failures.

Refactored `GraphApiService` to improve handling of inheritable permissions, added the `GraphPostWithResponseAsync` method, and introduced dependency injection for better testability. Added unit tests for `GraphApiService` to validate new functionality.

Improved logging, modularized code, and aligned the CLI structure with the updated `deploy` command behavior.
- Added `GraphApiService` as a dependency in `DeployCommand` and subcommands for modular Graph API interactions.
- Introduced `IMicrosoftGraphTokenProvider` for delegated token acquisition, supporting dynamic scope requests.
- Refactored `SetInheritablePermissionsAsync` to `SetInheritablePermissionsAsyncV2` with additional scope support.
- Added `EnsureApplicationHasRequiredPermissionsAsync` to manage app resource access declarations.
- Introduced `AdminConsentHelper` for reusable admin consent polling logic.
- Updated `A365SetupRunner` to use `AdminConsentHelper` for consistency.
- Enhanced dependency injection in `Program.cs` to register new services.
- Added unit tests for `AdminConsentHelper` and updated tests for `DeployCommand`.
- Improved error handling, logging, and modularity across the codebase.
- Reorganized dependency registration and improved test coverage for new features.
@sellakumaran sellakumaran requested review from a team as code owners November 19, 2025 02:30
@sellakumaran sellakumaran merged commit 1e8d997 into main Nov 19, 2025
2 checks passed
@sellakumaran sellakumaran deleted the users/sellak/deployscopes branch December 4, 2025 19:14
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.

2 participants