Skip to content

Add azmcp-keyvault-admin-settings-get for KeyVault.Administration#358

Merged
JonathanCrd merged 25 commits intomicrosoft:mainfrom
JonathanCrd:keyvault/new-command-admin-get-settings
Sep 23, 2025
Merged

Add azmcp-keyvault-admin-settings-get for KeyVault.Administration#358
JonathanCrd merged 25 commits intomicrosoft:mainfrom
JonathanCrd:keyvault/new-command-admin-get-settings

Conversation

@JonathanCrd
Copy link
Copy Markdown
Member

@JonathanCrd JonathanCrd commented Sep 6, 2025

What does this PR do?

This PR adds the first tool for KeyVault Administration (Data Plane): azmcp-keyvault-admin-settings-get

GitHub issue number?

Resolves #308

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Updated command list in /docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Comment thread tools/Azure.Mcp.Tools.KeyVault/src/Commands/Admin/AdminSettingsGetCommand.cs Outdated
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/Services/KeyVaultService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/KeyVaultSetup.cs Outdated
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure MCP Server Sep 8, 2025
@JonathanCrd JonathanCrd marked this pull request as ready for review September 8, 2025 22:55
Copilot AI review requested due to automatic review settings September 8, 2025 22:55
@JonathanCrd JonathanCrd requested review from a team and vcolin7 as code owners September 8, 2025 22:55
Copy link
Copy Markdown
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 the first tool for KeyVault Administration (Data Plane): azmcp-keyvault-admin-settings-get. The command retrieves Key Vault administration settings including purge protection state and soft delete retention days using the Azure.Security.KeyVault.Administration SDK.

  • Implements the azmcp-keyvault-admin-settings-get command for retrieving Key Vault administration settings
  • Extends KeyVaultService with new data plane administration functionality
  • Adds comprehensive test coverage for the new admin settings command

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
AdminSettingsGetCommandTests.cs Unit tests for the new admin settings get command
KeyVaultService.cs Extended service with GetVaultSettings method using Administration SDK
IKeyVaultService.cs Interface extension with new method and VaultSettings record
AdminSettingsGetOptions.cs Options class for admin settings command
KeyVaultSetup.cs Command registration for admin settings functionality
KeyVaultJsonContext.cs JSON serialization context for VaultSettings
AdminSettingsGetCommand.cs Implementation of the admin settings get command
Azure.Mcp.Tools.KeyVault.csproj Added Azure.Security.KeyVault.Administration package reference
CHANGELOG.md Documentation of the new feature
Directory.Packages.props Package version management for the new dependency

Comment thread tools/Azure.Mcp.Tools.KeyVault/src/Commands/Admin/AdminSettingsGetCommand.cs Outdated
@joshfree joshfree added this to the 2025-09 milestone Sep 9, 2025
Comment thread docs/e2eTestPrompts.md Outdated
Comment thread docs/azmcp-commands.md
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/Commands/Admin/AdminSettingsGetCommand.cs Outdated
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/Services/IKeyVaultService.cs
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/KeyVaultSetup.cs Outdated
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/KeyVaultSetup.cs Outdated
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/Services/KeyVaultService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/Commands/KeyVaultJsonContext.cs Outdated
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/Services/IKeyVaultService.cs Outdated
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/Commands/Admin/AdminSettingsGetCommand.cs Outdated
Comment thread docs/e2eTestPrompts.md Outdated
Comment thread servers/Azure.Mcp.Server/CHANGELOG.md Outdated
Comment thread eng/vscode/CHANGELOG.md Outdated
Comment thread tools/Azure.Mcp.Tools.KeyVault/src/KeyVaultSetup.cs Outdated
@JonathanCrd JonathanCrd merged commit 0d87d5c into microsoft:main Sep 23, 2025
25 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure MCP Server Sep 23, 2025
colbytimm pushed a commit to colbytimm/microsoft-mcp that referenced this pull request Sep 27, 2025
…icrosoft#358)

* Added Azure.Security.KeyVault.Administration to project

* Added command

* Added tests

* Update CHANGELOGs

* dotnet format

* Addressed comments in PR review

* Cleaned up unused using statement.

* Update README.md and azmcp-commands.md

* Add prompts for retrieving key vault administration settings

* Addressed comments and applied code suggestions

* Return the settings as a dictionary and use SDK types

* Rename TenantID

* Add live tests

* dotnet format

* Add keyVaultAdminRoleDefinition

* Use Managed HSM URI and improve descriptions

* Fix tests

* Use updated pattern

* addressing comments

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

Labels

None yet

Projects

Status: Done

6 participants