Intune device report with last logged on user

jarweb 131 Reputation points
2024-10-16T08:15:10.66+00:00

Hi

We need to be able to regularly export a full inventory of devices registered on Intune but include the last logged on user. This is so we know which staff member is currently using (or uses) which device. This is NOT the Primary user as this will be one of our admin staff who set up the computers.

I think can manually drill into a device and see the last person to log on. Think you can do this the other way as well and get the device from the user account. But this isn't practical to do for hundreds of devices.

But I can't see a way to get a report to include these together in one place, either in the portal or via Powershell. I've seen many other people asking the same question but no definitive answer.

I would have thought this would be a fairly common thing to require so not sure why it seems so difficult to achieve. Unless I've missed something obvious (I hope so).

Any advice welcome

Thanks

Microsoft Security Microsoft Entra Microsoft Entra ID
Microsoft Security Intune Other
{count} votes

Accepted answer
  1. ZhoumingDuan-MSFT 17,165 Reputation points Microsoft External Staff
    2024-10-17T02:16:59.84+00:00

    @jarweb,Thanks for posting in Q&A.

    From your description, I know you want to export a full inventory of devices registered on Intune and include the last logged on user.

    Based on my research, usersLoggedOn stores the last logged on user object id of a device. We can see more details in the following link: https://learn.microsoft.com/en-us/graph/api/resources/intune-devices-windowsmanageddevice?view=graph-rest-beta

    https://learn.microsoft.com/en-us/graph/api/intune-devices-windowsmanageddevice-get?view=graph-rest-beta

    Here are the devices result when I check in Graph explorer:

    User's image

    Hope it can help.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Peter Prellwitz 10 Reputation points
    2024-11-14T15:39:01.91+00:00

    I was researching this very question for my own "find the last user" quest and stumbled onto a solution that proved useful:

    Intune > Device > Monitor > Device Compliance

    The Default Device Compliance Policy lists the Logged in user; State; User email; and Last contacted.

    I hope this helps!

    Pete in Philly

    2 people found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.