Skip to content

Conversation

@sellakumaran
Copy link
Contributor

@sellakumaran sellakumaran commented Jan 20, 2026

Set owners@odata.bind during blueprint creation to address Entra bug preventing post-creation owner assignment. Remove post-creation owner add logic and replace with read-only owner validation (IsApplicationOwnerAsync). Update logging, user guidance, and tests to reflect new behavior. Improve Azure CLI login messaging.

Fixes #159

Set owners@odata.bind during blueprint creation to address Entra bug preventing post-creation owner assignment. Remove post-creation owner add logic and replace with read-only owner validation (IsApplicationOwnerAsync). Update logging, user guidance, and tests to reflect new behavior. Improve Azure CLI login messaging.
@sellakumaran sellakumaran requested review from a team as code owners January 20, 2026 22:40
Copilot AI review requested due to automatic review settings January 20, 2026 22:40
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 pull request refactors the application owner management approach for Agent Blueprint creation. Instead of using a 2-call pattern (create blueprint, then add owner), it now sets owners during blueprint creation using the owners@odata.bind field. The AddApplicationOwnerAsync method is renamed to IsApplicationOwnerAsync to reflect its new read-only validation purpose.

Changes:

  • Refactored AddApplicationOwnerAsync to IsApplicationOwnerAsync for read-only owner validation
  • Added owners@odata.bind field during blueprint creation to set owners upfront
  • Enhanced Azure CLI login messaging with better user guidance
  • Updated all tests to reflect the new read-only behavior

Reviewed changes

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

File Description
GraphApiServiceIsApplicationOwnerTests.cs Renamed test class and updated all test methods to verify read-only owner checking behavior instead of owner addition logic
GraphApiService.cs Renamed method from AddApplicationOwnerAsync to IsApplicationOwnerAsync, removed POST logic, kept only GET/validation logic, and improved login messaging
BlueprintSubcommand.cs Added owners@odata.bind field during blueprint creation, replaced owner addition with read-only validation for new blueprints, and added comprehensive user guidance for manual owner management
InfrastructureSubcommand.cs Enhanced Azure CLI login message to guide users about browser window location
Comments suppressed due to low confidence (2)

src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Services/GraphApiServiceIsApplicationOwnerTests.cs:230

  • Disposable 'HttpResponseMessage' is created but not disposed.
    src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Services/GraphApiServiceIsApplicationOwnerTests.cs:254
  • Disposable 'HttpResponseMessage' is created but not disposed.

@sellakumaran sellakumaran merged commit ae5347c into main Jan 21, 2026
11 checks passed
@sellakumaran sellakumaran deleted the users/sellak/abOwner2 branch January 21, 2026 19:23
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.

Complete Agent Identities provisioning (AB owner and AI oauth consent)

4 participants