Skip to content

[POSTGRESQL] az postgres flexible-server create/restore/geo-restore/replica create: Add new arguments --federated-client-id and --backup-federated-client-id to support multi-tenant application registration#33645

Open
nasc17 wants to merge 3 commits into
Azure:devfrom
nasc17:nasc/crossTenantCommands

Conversation

@nasc17

@nasc17 nasc17 commented Jun 24, 2026

Copy link
Copy Markdown
Member

Related command
az postgres flexible-server create
az postgres flexible-server restore
az postgres flexible-server geo-restore
az postgres flexible-server replica create

Description
Allow support for servers with Azure Key Vault from a different Microsoft Entra tenant using multi-tenant application registration.

Testing Guide
Manual

History Notes
[POSTGRESQL] az postgres flexible-server create/restore/geo-restore/replica create: Add new arguments --federated-client-id and --backup-federated-client-id to support multi-tenant application registration

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 24, 2026

Copy link
Copy Markdown
️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.14
️✔️acs
️✔️latest
️✔️3.12
️✔️3.14
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.14
️✔️ams
️✔️latest
️✔️3.12
️✔️3.14
️✔️apim
️✔️latest
️✔️3.12
️✔️3.14
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.14
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️aro
️✔️latest
️✔️3.12
️✔️3.14
️✔️backup
️✔️latest
️✔️3.12
️✔️3.14
️✔️batch
️✔️latest
️✔️3.12
️✔️3.14
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.14
️✔️billing
️✔️latest
️✔️3.12
️✔️3.14
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.14
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.14
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.14
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.14
️✔️config
️✔️latest
️✔️3.12
️✔️3.14
️✔️configure
️✔️latest
️✔️3.12
️✔️3.14
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.14
️✔️container
️✔️latest
️✔️3.12
️✔️3.14
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.14
️✔️core
️✔️latest
️✔️3.12
️✔️3.14
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.14
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.14
️✔️dls
️✔️latest
️✔️3.12
️✔️3.14
️✔️dms
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.14
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.14
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.14
️✔️find
️✔️latest
️✔️3.12
️✔️3.14
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.14
️✔️identity
️✔️latest
️✔️3.12
️✔️3.14
️✔️iot
️✔️latest
️✔️3.12
️✔️3.14
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.14
️✔️lab
️✔️latest
️✔️3.12
️✔️3.14
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.14
️✔️maps
️✔️latest
️✔️3.12
️✔️3.14
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.14
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.14
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.14
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.14
️✔️network
️✔️latest
️✔️3.12
️✔️3.14
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.14
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.14
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.14
️✔️profile
️✔️latest
️✔️3.12
️✔️3.14
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.14
️✔️redis
️✔️latest
️✔️3.12
️✔️3.14
️✔️relay
️✔️latest
️✔️3.12
️✔️3.14
️✔️resource
️✔️latest
️✔️3.12
️✔️3.14
️✔️role
️✔️latest
️✔️3.12
️✔️3.14
️✔️search
️✔️latest
️✔️3.12
️✔️3.14
️✔️security
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.14
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.14
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.14
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.14
️✔️sql
️✔️latest
️✔️3.12
️✔️3.14
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.14
️✔️storage
️✔️latest
️✔️3.12
️✔️3.14
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.14
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.14
️✔️util
️✔️latest
️✔️3.12
️✔️3.14
️✔️vm
️✔️latest
️✔️3.12
️✔️3.14

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @nasc17,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented Jun 24, 2026

Copy link
Copy Markdown
⚠️AzureCLI-BreakingChangeTest
⚠️postgresql
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd postgres flexible-server create cmd postgres flexible-server create added parameter backup_federated_client_id
⚠️ 1006 - ParaAdd postgres flexible-server create cmd postgres flexible-server create added parameter federated_client_id
⚠️ 1006 - ParaAdd postgres flexible-server geo-restore cmd postgres flexible-server geo-restore added parameter backup_federated_client_id
⚠️ 1006 - ParaAdd postgres flexible-server geo-restore cmd postgres flexible-server geo-restore added parameter federated_client_id
⚠️ 1006 - ParaAdd postgres flexible-server replica create cmd postgres flexible-server replica create added parameter backup_federated_client_id
⚠️ 1006 - ParaAdd postgres flexible-server replica create cmd postgres flexible-server replica create added parameter federated_client_id
⚠️ 1006 - ParaAdd postgres flexible-server restore cmd postgres flexible-server restore added parameter backup_federated_client_id
⚠️ 1006 - ParaAdd postgres flexible-server restore cmd postgres flexible-server restore added parameter federated_client_id
⚠️ 1006 - ParaAdd postgres flexible-server update cmd postgres flexible-server update added parameter backup_federated_client_id
⚠️ 1006 - ParaAdd postgres flexible-server update cmd postgres flexible-server update added parameter federated_client_id

@yonzhan

yonzhan commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

POSTGRESQL

@nasc17 nasc17 changed the title [POSTGRESQL] az postgres flexible-server create/restore/geo-restore/replica create: Add new arguments --federated-client-id and --geo-backup-federated-client-id to support multi-tenant application registration [POSTGRESQL] az postgres flexible-server create/restore/geo-restore/replica create: Add new arguments --federated-client-id and --backup-federated-client-id to support multi-tenant application registration Jun 26, 2026
@nasc17 nasc17 marked this pull request as ready for review June 26, 2026 20:02
@nasc17 nasc17 requested review from Pan-Qi and VeryEarly as code owners June 26, 2026 20:02
Copilot AI review requested due to automatic review settings June 26, 2026 20:02
@nasc17 nasc17 requested a review from YangAn-microsoft as a code owner June 26, 2026 20:02

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

This PR extends the PostgreSQL flexible server BYOK (Azure Key Vault) flow to support multi-tenant application registration by introducing new CLI arguments for federated identity client IDs, and wiring them through validation and request payload construction.

Changes:

  • Added --federated-client-id and --backup-federated-client-id CLI parameters and surfaced them in help.
  • Extended BYOK validation to account for federated client IDs.
  • Passed federated client IDs into the DataEncryption payload when building server parameters.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
src/azure-cli/azure/cli/command_modules/postgresql/utils/validators.py Adds federated client ID validation to BYOK validator flow.
src/azure-cli/azure/cli/command_modules/postgresql/utils/_flexible_server_util.py Extends BYOK identity/encryption payload builder to include federated client IDs.
src/azure-cli/azure/cli/command_modules/postgresql/commands/replica_commands.py Threads new federated client ID args through replica create validation and payload building.
src/azure-cli/azure/cli/command_modules/postgresql/commands/custom_commands.py Threads new federated client ID args through create/restore/update/geo-restore command paths.
src/azure-cli/azure/cli/command_modules/postgresql/_params.py Adds the new arguments to command argument contexts.
src/azure-cli/azure/cli/command_modules/postgresql/_help.py Documents an example of using --federated-client-id for cross-tenant Key Vault.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/azure-cli/azure/cli/command_modules/postgresql/commands/custom_commands.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/postgresql/commands/custom_commands.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/postgresql/commands/custom_commands.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/postgresql/commands/custom_commands.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/postgresql/commands/custom_commands.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/postgresql/commands/custom_commands.py Outdated
Comment thread src/azure-cli/azure/cli/command_modules/postgresql/utils/_flexible_server_util.py Outdated
@nasc17

nasc17 commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

HI @yonzhan @Pan-Qi can you please trigger all checks

@yonzhan

yonzhan commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants