@Dilan Nanayakkara , Research and find 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 is the one device result when I check in Graph explorer:
Research more and find a link describe bulk change all Intune device Primary Users to last logged on user. maybe it can be helpful to you.
https://svdbusse.github.io/SemiAnnualChat/2020/03/21/Changing-Intune-Primary-User-To-Last-Logged-On-User.html
Note: Non-Microsoft link, just for the reference.
Hope it can help.
If the response is helpful, please click "Accept Answer" and upvote it.
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.