Get a device's Primary User in Intune API Response

Incase-1231 1 Reputation point
2022-12-09T12:35:48.467+00:00

As of right now, the production Graph API response for querying the list of all devices in Intune only includes the email of the device's Enrolled By user.

https://graph.microsoft.com/v1.0/deviceManagement/managedDevices  

{"id"=>"{managed_device_id}", ...., "emailAddress"=>"**{enrolled_by_user_email_address}**", ....}  

We need to get the email of the device's Primary User, which isn't included in the API response at all.

By using the Beta version of the Graph API, it's possible to query an endpoint to get the Primary User's email address, but that requires a separate query to be run for every device, which isn't feasible for us as we have a large amount of devices.

https://graph.microsoft.com/beta/deviceManagement/managedDevices/{managed_device_id}/users  

Are there any plans to add the email address of the device's Primary User to the first list query?
If so, is there any timeline for this implementation?

This is a really critical point for us, as we enroll the devices internally first before sending them out to the end user.

Thanks in advance!

Microsoft Intune Reporting
Microsoft Intune Reporting
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Reporting: The process of giving an account of something that has been observed, heard, done, or investigated.
66 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,657 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lu Dai-MSFT 28,366 Reputation points
    2022-12-12T02:11:49.643+00:00

    @Incase-1231 Thanks for posting in our Q&A.

    Currently, only this request can get the Primary User.

    GET /beta/deviceManagement/managedDevices/{managedDeviceId}/users   
    

    Additionally, please try to refer to the following link that get all devices and primary users.
    https://github.com/microsoftgraph/powershell-intune-samples/blob/master/ManagedDevices/Win10_PrimaryUser_Get.ps1

    Not sure if there is a plan to add the email address of the device's Primary User to the query you want. If you are interested in this, it is suggested to post in intune feedback portal. It is a place to collect customers' requirements and problems. Here is the link:
    https://feedbackportal.microsoft.com/feedback/forum/ef1d6d38-fd1b-ec11-b6e7-0022481f8472

    Hope it will occur in the future.


    If the answer is the right solution, 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.

    0 comments No comments