Individual request to the Managed device returns wrong user information

Katie Parfinenko 0 Reputation points
2024-07-23T18:10:00.8033333+00:00

Managed Intune device resource has some user information fields: userId, userPrincipalName, userDisplayName.

Request to the devices list https://learn.microsoft.com/en-us/graph/api/intune-devices-manageddevice-list?view=graph-rest-1.0&viewFallbackFrom=graph-rest-beta
returns a correct actual Primary User data (at least now, about 1-2 years ago it was not accurate for example after primary user changing)

Request to an individual device https://learn.microsoft.com/en-us/graph/api/intune-devices-manageddevice-get?view=graph-rest-beta returns a wrong Primary User information for several devices (but I have actual PU data for these devices in the List response).

Even for one device (I set primary user a long time ago) UserId is returned correctly while UserPrincipalName and UserDisplayName are null! (see screen below)

What is happening here? Can this issue be fixed please?

P.S. I know that correct primary user data can be loaded from another query
GET /beta/deviceManagement/managedDevices/{managedDeviceId}/users
But it would be nice if Individual request will return a correct data, like the list request does now.

And we avoid using additional requests for each device / primary user due to query limits, it is very inconvenient and need much time when there is a large amount of devices.
Untitled

Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,742 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Crystal-MSFT 46,266 Reputation points Microsoft Vendor
    2024-07-24T01:45:19.6966667+00:00

    @Katie Parfinenko, Thanks for posting in Q&A. From your description, it seems the UserPrincipalNam is not correct or none after we change the primary user of one managed device. It affects some devices.

    Based on my checking in my environment, I find it displays correct after I change primary user.

    User's image

    So I suggest open case to check in the background to see if there's any synced issue there.

    https://learn.microsoft.com/en-us/mem/get-support

    Thanks for your understanding.


    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.

    0 comments No comments