Get Devices for list of users

aravind anche 31 Reputation points
2024-03-07T14:44:22.3866667+00:00

Hello We have list of users(email address and name), we would like to get the devices associated for that users, pls suggest.

Regards

Windows for business Windows Server User experience PowerShell
Microsoft Security Intune Other
{count} votes

4 answers

Sort by: Most helpful
  1. Crystal-MSFT 53,981 Reputation points Microsoft External Staff
    2024-03-08T01:41:11.07+00:00

    @aravind anche, Thanks for posting in Q&A. Based on testing in my lab, I find we can get devices assigned to user in Intune via the following method:

    1. Right click PowerShell ISE and choose "Run as Administrator"
    2. Run the following command to install script "get-intune-details-from-user", click Yes to all. Install-Script -Name get-intune-details-from-user
    3. Enter your Global administrator account to connect to Intune.
    4. Enter the user's principle name to check his/her devices.

    User's image

    User's image

    Here is a link for your reference:

    https://andrewstaylor.com/2021/12/22/finding-devices-and-details-assigned-to-a-user-in-intune/

    Note: Non-Microsoft link, just for the reference.

    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.

    0 comments No comments

  2. aravind anche 31 Reputation points
    2024-03-08T14:19:44.35+00:00

    thank you! is there any way to get for all users

    0 comments No comments

  3. aravind anche 31 Reputation points
    2024-03-08T16:10:31.2666667+00:00

    We are intune managed environment, I ran the command and it didnt prompt me like the box in above

    0 comments No comments

  4. Crystal-MSFT 53,981 Reputation points Microsoft External Staff
    2024-03-11T06:22:15.3933333+00:00

    @aravind anche,, Thanks for the reply. The box comes after authentication. You can check if any authentication windows in the background.

    Meanwhile, to query the devices for all the users, you can try the following method:

    1. Install Intune SDK PowerShell Module
         Install-Module Microsoft.Graph.Intune
         
         Import-Module Microsoft.Graph.Intune
      
    2. Connect to Intune Tenant :
         Connect-MSGraph
      
    3. Enter Global Administrator credential
    4. Run the following command to query
         Get-IntuneManagedDevice | fl devicename,user
         
      
      User's image Hope the above information can help.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.