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

Abierto
#1,101 4 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@VeryEarly ya está trabajando en esto.

Desde el 14/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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

Lenguaje dominante
C#
Estrellas
18
Forks
10
Merge medio
1 d 20 h
PR fusionados (30 d)
157

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Azure/azclips

Todos los issues de Azure/azclips

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.