Service Graph Intune Connector : Assigned to

parth2
Tera Contributor

Can I get help to understand what is 'assigned to' on computer in ServiceNow mapped to from Intune?

There are two fields in Intune - 'Primary User' and 'Enrolled User' find_real_file.png

 

I can see the data stream is using the API /deviceManagement/managedDevices/

The API doesnt really mentions if its returning primary user or enrolled user.

Can someone help me understand the difference between the primary user or enrolled user. Also based on the imported data, it appears that the api returns enrolled user. If so, how can we configure it to populate primary user?

1 ACCEPTED SOLUTION

Palani Chockali
ServiceNow Employee
ServiceNow Employee

Hi Parth,

Jim has provided an excellent answer to your mapping question with visualization. The API call returns only the enrolled user, even though the attribute name says primary user. When a user is assigned to a device initially, the enrolled and primary user remain the same. But if the same device is reassigned to another user, either the user left the tenant or for other business reasons, then the primary user name gets reassigned to the new user but the enrolled user will have the original enrolled user name. That is the difference between the two attributes in Intune. 

We have fixed this to reflect the current device owner in an upcoming release of Intune(do not have dates yet!). Per Microsoft, we have to make another API call to get the current primary user name as the device API only returns enrolled user name (misleading with an attribute name like "userPrincipalName"). 

Here is the Graph API call to know the primary user name:

https://graph.microsoft.com/beta/deviceManagement/managedDevices/<deviceid>/users

The output of the above API call will give us the actual/current device owner or the primary user name. No surprise here from Microsoft and the attribute name again is "userPrincipalName".
I was also told that Microsoft is working on converging these API calls so it correctly reports on the primary user name on the current device call but it is not in place yet and not sure of the timeline also.

This involves making an additional API call for each device to know the primary username. We typically do performance testing as part of any major changes, especially when it comes to additional API calls to make sure it did not degrade current performance.  This is work in progress as we speak. We would highly recommend you to wait and take the upgrade when it is available, assuming all the testing/performance are acceptable.

Hopefully this helps clarify your questions.

View solution in original post

11 REPLIES 11

Hello Palani,  Can you please let me know when we will have the release to change the call to Primary user? 

I believe this has been resolved in Service Graph Connector for Microsoft Intune version 2.2.1 which should return the current device owner or primary user.


FYL_0-1690851496585.png