microsoftgraph / microsoftgraph/msgraph-beta-sdk-python
devices expand=registeredUsers does only return the id
還沒有人認領這個 Issue。
- 主要語言
- Python
- 星號
- 44
- 分支
- 16
- 平均合併
- 20 小時 39 分鐘
- 30 天內合併 PR
- 3
描述
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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
先透過 GraphServiceClient 和 DevicesRequestBuilder 使用 expand=['registeredUsers'] 重現要求,然後比較 SDK 回應與 Graph Explorer 回應。追蹤 registeredUsers 在傳回的裝置物件中如何表示及填入;完成的條件是展開的使用者除了 id 之外還會暴露其他屬性,且與服務回應相符。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- api
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100