Intune report for users with multiple devices assigned as Primary User


Anybody knows if I can get a report (I assume from Graph) which only displays users with multiple devices assigned (as Primary User, which most likely was an error when issuing replacement device etc)





6 Replies
This could be a beginning


Get-IntuneManagedDevice | Where-Object {$_.operatingSystem -match "Windows"} | select-object userDisplayName,deviceName,lastSyncDateTime | sort-object userdisplayname | Out-GridView



It gives... a report (of sorts). 

In User Display Name, it only shows for machines that were manually Enrolled & it gives the name of the person that done it, but NOT Primary User (as assigned in Properties)




Also tested the script, but you are right indeed, on another blog they were telling this would show the primary user but it doesn't. Just changed a primary user... it is indeed not listed

Did you also take a look at this one: It will list all primary users for each device.
I guess if you take some time you can change the script a little bit to get a better report

Yes, I am using already these powershell-intune-samples.

Sadly they are build with no option to output to anything apart from screen (without code change), so I do



Start-Transcript $File -Append



Why is so difficult to get proper reporting from MDM?

best response confirmed by Sebastian Cerazy (Contributor)

You could create compliance report, you could export it to csv and if I am reading it correctly the upn shows the primary user (it lists the device I just changed with the correct primary user)
Thanks, I suppose that compliance report is the best I can get quickly for now!