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