microsoftgraph / microsoftgraph/msgraph-beta-sdk-python

devices expand=registeredUsers does only return the id

Aperta
#1,006 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

status:waiting-for-triage type:bug
Lingua principale
Python
Stelle
44
Fork
16
Merge medio
20h 39m
PR unite (30g)
3

Descrizione

Describe the bug

Using the devices endpoint in graph and the parameter expand=registeredUsers is supposed to return (all) values for all registered users.
Each registered user is supposed to be of type #microsoft.graph.user
Using graph-explorer, this works, i.e. https://graph.microsoft.com/beta//devices?$expand=registeredUsers
will contain a list of microsoft.graph.user objects in the registeredUsers property, where each user has attributes like mail, imAddresses etc filled.
Using the SDK only the id property for the microsoft.graph.user object is filled, i.e. all other properties are None or empty collections.

Is this a bug or something on my end I don't understand?

my calling code (broken down):

request_config = DevicesRequestBuilder.DevicesRequestBuilderGetQueryParameters(
        top=20,
        expand=['registeredUsers']
    )
self._event_loop.run_until_complete(self._graph_service.devices.get(request_config))

where _event_loop == asyncio.get_event_loop()
and _graph_service == GraphServiceClient

Expected behavior

A list of devices is returned, where registered Users of type #microsoft.graph.user in the device's registeredUsers property have more properties filled than just the ID

How to reproduce

See description

SDK Version

1.56.0

Latest version known to work for scenario above?

No response

Known Workarounds

No response

Debug output

No response

Configuration
  • OS: MacOS 26.3.1
  • Arch: Apple Silicon
  • Python: 3.13.7 (venv)
Other information

No response

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 la richiesta tramite GraphServiceClient e DevicesRequestBuilder con expand=['registeredUsers'], quindi confronta la risposta dell'SDK con la risposta di Graph Explorer. Traccia come registeredUsers viene rappresentato e popolato negli oggetti dispositivo restituiti; il lavoro è completato quando gli utenti espansi espongono proprietà oltre a id, corrispondenti alla risposta del servizio.

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

Valutazione

Stack tecnologico
python
Ambito
api
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.