You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过Graph API获取用户登录设备的操作系统?

仅获取登录日志中deviceDetail.operatingSystem字段的Graph API查询方法

要只返回deviceDetail下的operatingSystem字段,你需要在请求URL中使用**$select**查询参数,通过点语法指定嵌套字段:

GET https://graph.microsoft.com/v1.0/auditLogs/signIns?$select=deviceDetail/operatingSystem

返回的数据结构会精简为仅包含你指定的字段:

{
    "value": [
        {
            "deviceDetail": {
                "operatingSystem": "Windows 10"
            }
        }
    ]
}

如果还需要同时返回其他顶层字段(比如userPrincipalName),可以用逗号分隔多个字段:

GET https://graph.microsoft.com/v1.0/auditLogs/signIns?$select=userPrincipalName,deviceDetail/operatingSystem

内容的提问来源于stack exchange,提问作者user8080

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.28 12:52:10