microsoftgraph / microsoftgraph/msgraph-sdk-powershell

Endpoint "/beta/deviceManagement/configurationPolicies" misbehaves when expanding property assignments for specific policy

Aperta
#3,337 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Service issue type:bug
Lingua principale
C#
Stelle
898
Fork
230
Merge medio
2g 5h
PR unite (30g)
31

Descrizione

Describe the bug

This issue happens ONLY when the targeted policy is of a templateFamily that starts with "endpointSecurity".

I was trying to query the endpoint using the cmdlet:
Get-MgBetaDeviceManagementConfigurationPolicy -ExpandProperty assignments -DeviceManagementConfigurationPolicyId "PolicyID"
and, although the response had the property assignments in the body json, the assignments where empty.

Interestingly, if I query the endpoint without specifying a policy ID (Get-MgBetaDeviceManagementConfigurationPolicy -ExpandProperty assignments), it seems to actually return the data correctly for all the policies.

For the record, I replicated the same scenario in the graph explorer as well

Expected behavior

Expected behaviour would be to actually be able to expand the property assignments even when using the id to target a specific policy

How to reproduce

Execute the command Get-MgBetaDeviceManagementConfigurationPolicy -ExpandProperty assignments
Check that all the policies return the correct assignment data
Execute the command Get-MgBetaDeviceManagementConfigurationPolicy -ExpandProperty assignments -DeviceManagementConfigurationPolicyId "PolicyID"
Check that the returned data do not show any assignments.

Non Working query
Image

Working query
Image

SDK Version

2.28.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output
Click to expand log ```
</details>


### Configuration

Name                           Value
----                           -----
PSVersion                      7.5.1
PSEdition                      Core
GitCommitId                    7.5.1
OS                             Microsoft Windows 10.0.26100
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

### Other information

Since this issue is tied to the endpoint not returning the correct data, I believe it is not tied to any of the SDKs. Should be a bug on the backend side,

Guida per i contributori

Apri la guida per i contributori

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.

Direzione di ricerca

Inizia riproducendo le due query Get-MgBetaDeviceManagementConfigurationPolicy su /beta/deviceManagement/configurationPolicies, usando -ExpandProperty assignments con e senza -DeviceManagementConfigurationPolicyId. Confronta i dati delle assegnazioni per un criterio il cui templateFamily inizia con "endpointSecurity"; il lavoro è completato quando la query mirata restituisce le stesse assegnazioni della query non filtrata.

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

Valutazione

Stack tecnologico
powershell
Ambito
api
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.