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

Aperta
#936 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
csharp, powershell
Ambito
cli

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

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.