How to get the users who have more than 1 devices enrolled in Intune via PowerShell along with their last sign-in details like date & time?

Vinod Survase 4,716 Reputation points
2023-04-12T08:45:01.1666667+00:00

How to get the users who have more than 1 devices enrolled in Intune via PowerShell along with their last sign-in details like date & time?

Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,783 questions
Microsoft Intune Reporting
Microsoft Intune Reporting
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Reporting: The process of giving an account of something that has been observed, heard, done, or investigated.
66 questions
Microsoft Intune Application management
Microsoft Intune Application management
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Application management: The process of creating, configuring, managing, and monitoring applications.
908 questions
Microsoft Intune Enrollment
Microsoft Intune Enrollment
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Enrollment: The process of requesting, receiving, and installing a certificate.
1,301 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,657 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Crystal-MSFT 45,571 Reputation points Microsoft Vendor
    2023-04-13T05:41:02.82+00:00

    @Vinod Survase, Thanks for posting in Q&A. For your request, this needs to be done via PowerShell Script. Here, I have written a script and upload in the attachment. You can download the enrolled_user.txt file and rename it with enrolled_user.ps1. And then run the script. It will ask "Please specify your user principal name for Azure Authentication", in this place enter your global administrator to do the authentication.

    After that, it will ask you to enter the user principal name you want to query. Enter the user principle name, and then you will get the devices he/she enrolled and its last sign in information. User's image

    Hope the above information can help.


    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.