SOLVED

Intune report for users with multiple devices assigned as Primary User

Iron Contributor

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)

 

Thanks

 

Seb

6 Replies
Hi,
This could be a beginning

connect-msgraph

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

https://scribbleghost.net/2019/11/07/getting-device-details-from-azure-with-powershell/

@Rudy_Ooms_MVP 

 

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)

 

Hi,

 

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

https://github.com/microsoftgraph/powershell-intune-samples/blob/master/ManagedDevices/Win10_Primary...

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

 

$File="C:\temp\devices.txt"

Start-Transcript $File -Append

.\Win10_PrimaryUser_Get.ps1

Stop-Transcript


Why is so difficult to get proper reporting from MDM?

best response confirmed by Sebastian Cerazy (Iron Contributor)
Solution
https://endpoint.microsoft.com/#blade/Microsoft_Intune_Enrollment/ReportingMenu/deviceCompliance

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!
1 best response

Accepted Solutions
best response confirmed by Sebastian Cerazy (Iron Contributor)
Solution
https://endpoint.microsoft.com/#blade/Microsoft_Intune_Enrollment/ReportingMenu/deviceCompliance

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)

View solution in original post