[MsGraph] Command models expose a reduced property set, so Format-List * and -Select cannot surface full Graph payload

Abierto
#936 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
38/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
csharp, powershell
Área
cli

Línea de trabajo

Start by comparing the Application model with User, Group and DirectoryObject, which already carry the [JsonExtensionData] bag, then read the TypeSpec/codegen template that emits these models to see whether the bag can be added for every type. Decide with maintainers whether to expose all Graph fields or a curated subset before writing code. Done means Get-AzMsGraphApplication -Id <appId> | Format-List * shows the fields Graph returned, or an agreed explicit property set is modeled.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

act-codegen-extensibility-squad act-identity-squad
Target surface

Both

What problem are you trying to solve?

The MsGraph command models keep only a small subset of the fields Microsoft Graph returns, with no extension-data capture. As a result, properties that Graph actually returned are dropped during deserialization, so Format-List *, Select-Object , and -Select cannot surface them. Users cannot retrieve the full object even when Graph sent it.

  1. Get-AzMsGraphApplication -Id
  2. Pipe to Format-List *
  3. Only the modeled fields appear, not the full set Graph returned.
Proposed solution
Option 1 (interim): add an extension-data bag to Application. Mirror the pattern User, Group, and DirectoryObject already use, so unmapped Graph fields are retained:
[JsonExtensionData]
public Dictionary<string, JsonElement>? AdditionalProperties { get; set; }

Option 2 (proper fix): let codegen emit the full set. Since these models are codegen-owned, have the generator or TypeSpec model template either emit the complete property set for each type or always include the [JsonExtensionData] bag. That closes the gap consistently across all current and future models rather than patching one model at a time.
Alternatives or workarounds

No response

Additional context

We need to consider what properties we want to expose. There is a lot of them and they may not add user value and instead create noise.
If this is the case and we want a subset only we need to move the AdditionalProperties from all the commands and manually add the full model of what we do want to expose.

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.