az group create sets managedBy to "", and show/list display null as ""

Aperta
#1,101 4 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@VeryEarly ci sta già lavorando.

Dal 14/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

act-codegen-extensibility-squad bug X Engineering Agent Triaged
Affected surface

CLI (az)

Describe the bug

When I run az group create using the legacy and azclips Azure CLI, I see slightly different behaviour.

There is a property, managedBy that is ued by Managed Applications (such as AKS or Databricks) to link to the resourceId that is managing the backend resource group.

The legacy az group create will set this to null. The new azclips v1.5 sets this to empty string.

Also, the GET commands (list and show) will display managedBy as "" regardless of whether the JSON has it set to null, omitted, or set to empty string.

I suggest changing the create to also set managedBy to null for consistency, and the show/list to display the correct value.

Related command
`az group create`
Steps to reproduce

Separate bash sessions, one with legacy Azure CLI, the other switched to azclips. Output defaulted to json in both.

Create azclips resource group

Use the azclips CLI

az group create --name azclips --location uksouth

Create legacy resource group

Use the legacy CLI

az group create --name legacy --location uksouth

Display resource groups

Use both azclips and legacy CLIs for comparison.

echo "List"
az group list
echo "Show azclips"
az group show --name azclips
echo "Show legacy"
az group show --name legacy

Compare the managedBy property. The azclips CLI shows the value as "". The legacy CLI correctly shows the value as "" or null.

Display resource groups using az rest

Using azclips CLI:

echo "List"
az rest --uri "https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/?api-version=2021-04-01" --query json
echo "Show azclips"
az rest --uri "https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/azclips?api-version=2021-04-01" --query json
echo "Show legacy"
az rest --uri "https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/legacy?api-version=2021-04-01" --query json

Pipe each command through jq to prettify.

Using legacy CLI:

echo "List"
az rest --uri "https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/?api-version=2021-04-01"
echo "Show azclips"
az rest --uri "https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/azclips?api-version=2021-04-01"
echo "Show legacy"
az rest --uri "https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/legacy?api-version=2021-04-01"

Both show the value as "" for the one created by the azclips CLI, and is omitted in the REST API output for the one created by the legacy CLI.

Errors & debug output
No error message
Expected behavior
  1. Set managedBy to null when creating
  2. az group show/list to display value as null
  3. az rest commands to omit the property when value is null
Environment
{
  "azCli": "0.1.5",
  "runtime": {
    "dotNet": ".NET 10.0.12",
    "os": "Ubuntu 24.04.5 LTS",
    "architecture": "Arm64"
  },
  "paths": {
    "installLocation": "/home/richeney/.local/share/azcli",
    "configLocation": "/home/richeney/.azclips",
    "extensionsLocation": "/home/richeney/.azclips/extensions"
  }
}
Additional context

No response

Lingua principale
C#
Stelle
18
Fork
10
Merge medio
1g 20h
PR unite (30g)
157

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Azure/azclips

Tutte le issue di Azure/azclips

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.