Forum Discussion

Faiza Qadri's avatar
Faiza Qadri
Iron Contributor
Apr 19, 2019

Azure AD Data Extract

I'm trying to use the Get-AzureADusers command to get the following fields into a csv file:

 

NAME,ENABLED, OS, VERSION, JOIN, TYPE, OWNER, USER NAME, MDM, COMPLIANT, REGISTERED, ACTIVITY

I keep getting an error that its not valid value but I can see those values in the Azure view. 

 

TIA

 

#AzureAD

  • Might help if you give us the exact cmdlet you are running. The properties you've listed seem to correspond to device objects, not users...

  • joshuatoon's avatar
    joshuatoon
    Copper Contributor

    Faiza Qadri 

     

    Hi Faiza!

     

    You probably need to use a combination of cmdlets to get that data.  

     

    #Get All Devices

    $devices = Get-AzureADDevice -All $true

     

    For each device you can use Get-AzureADDeviceRegisteredUser or Get-AzureADDeviceRegisteredOwner to get the person associated with it. 

     

    • Faiza Qadri's avatar
      Faiza Qadri
      Iron Contributor

      joshuatoonGood to hear from you!

       

      I'm running the Get-AzureADDevice -all but only get the ObjectID, DeviceID, Displayname

       

      in the Azure portal under Azure Active Directory - Devices I can see the following:

Resources