Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Individual request to the Managed device sometimes returns wrong user information. #871

Open
eparfinenko opened this issue Aug 5, 2024 · 0 comments
Labels
type:bug A broken experience

Comments

@eparfinenko
Copy link

eparfinenko commented Aug 5, 2024

Describe the bug

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

Request to the devices list
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 returns a wrong Primary User information for several devices (but I have actual PU data for these devices in the List response).
Tested that after changing PU information is synchronized correctly. But, for some OLD-EXISTENT devices where PU was NOT UPDATED information is wrong.

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.

Expected behavior

Request to an Individual managed device to return a correct Primary User data: userId, userPrincipalName, userDisplayName.

How to reproduce

Request to some old-existend managed device:
/deviceManagement/managedDevices/{managedDeviceId}?$select=userId,userPrincipalName,userDisplayName
Compare user data with the response of
/deviceManagement/managedDevices/{managedDeviceId}/users?$top=1&select=id,userPrincipalName,displayName

SDK Version

5.60.0

Latest version known to work for scenario above?

none

Known Workarounds

No response

Debug output

Click to expand log

Other information

Problematic device: graph api response examples

Get device entity response - WRONG user data

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/managedDevices(userId,userDisplayName,userPrincipalName,id)/$entity",
    "userId": "00000000-0000-0000-0000-000000000000",
    "userDisplayName": null,
    "userPrincipalName": null,
    "id": "726f2e97-****"
}

Get devices list response - correct user data

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/managedDevices(userId,userDisplayName,userPrincipalName)",
    "@odata.count": 1,
    "value": [
        {
            "userId": "98013b47-****",
            "userDisplayName": "Cpc User",
            "userPrincipalName": "CpcUser@****",
            "id": "726f2e97-****"
        }
    ]
}

Get device users response - correct user data

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#users(id,userPrincipalName,displayName)",
    "value": [
        {
            "id": "98013b47-****",
            "userPrincipalName": "CpcUser@****",
            "displayName": "Cpc User"
        }
    ]
}

ANOTHER device: Get managed device returns conflicting data!

{
    "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceManagement/managedDevices(userId,userDisplayName,userPrincipalName,id)/$entity",
    "userId": "98013b47-****",
    "userDisplayName": null,
    "userPrincipalName": null,
    "id": "2dabd86f-****"
}

Graph explorer screen:
Untitled

@eparfinenko eparfinenko added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels Aug 5, 2024
@shemogumbe shemogumbe removed the status:waiting-for-triage An issue that is yet to be reviewed or assigned label Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

2 participants