如何在 Intune/Azure 上查找上次登录的用户

How to find last logged in user on Intune/Azure

我目前正在做一个项目,我需要在机器上找到同事的活动 用户名(不是设备名称或主机名)。由于在配置设备时没有标准的命名约定,我正在寻找一种方法来通过 Azure AD 或 Intune 找出或查看最后登录的用户。

不确定我是否在正确的地方制作这个 post,如果不正确,请告诉我应该在哪里 post 这个。

谢谢!

要获取 Intune 上最后登录用户的详细信息,请在 Microsoft Graph Explorer 中使用以下查询:

GET https://graph.microsoft.com/beta/deviceManagement/managedDevices/{managedDeviceId}

以上查询仅适用于 Microsoft Graph beta 版

请检查下方所需的权限

在输出响应中,可以在[=38=中找到UserIdLastlogonDateTime ]usersLoggedOn 字段。

为了通过UserId显示用户名,使用reference.

中提到的 powershell 脚本

Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant. Beta version is subject to change don't use it for production.

如需更多信息,请参考以下链接:

Get windowsManagedDevice - Microsoft Graph beta | Microsoft Docs

Find out last logon user of MDM assigned Coporate Device - Microsoft Q&A