Home

Azure AD Data Extract

%3CLINGO-SUB%20id%3D%22lingo-sub-475038%22%20slang%3D%22en-US%22%3EAzure%20AD%20Data%20Extract%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-475038%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20trying%20to%20use%20the%20Get-AzureADusers%20command%20to%20get%20the%20following%20fields%20into%20a%20csv%20file%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENAME%2CENABLED%2C%20OS%2C%20VERSION%2C%20JOIN%2C%20TYPE%2C%20OWNER%2C%20USER%20NAME%2C%20MDM%2C%20COMPLIANT%2C%20REGISTERED%2C%20ACTIVITY%3C%2FP%3E%3CP%3EI%20keep%20getting%20an%20error%20that%20its%20not%20valid%20value%20but%20I%20can%20see%20those%20values%20in%20the%20Azure%20view.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETIA%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%23AzureAD%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-475038%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20AD%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-475754%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20AD%20Data%20Extract%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-475754%22%20slang%3D%22en-US%22%3E%3CP%3EMight%20help%20if%20you%20give%20us%20the%20exact%20cmdlet%20you%20are%20running.%20The%20properties%20you've%20listed%20seem%20to%20correspond%20to%20device%20objects%2C%20not%20users...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-480693%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20AD%20Data%20Extract%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-480693%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F123820%22%20target%3D%22_blank%22%3E%40Faiza%20Qadri%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20Faiza!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20probably%20need%20to%20use%20a%20combination%20of%20cmdlets%20to%20get%20that%20data.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%23Get%20All%20Devices%3C%2FP%3E%3CP%3E%24devices%20%3D%20Get-AzureADDevice%20-All%20%24true%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20each%20device%20you%20can%20use%26nbsp%3BGet-AzureADDeviceRegisteredUser%20or%26nbsp%3BGet-AzureADDeviceRegisteredOwner%20to%20get%20the%20person%20associated%20with%20it.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-481171%22%20slang%3D%22en-US%22%3ERe%3A%20Azure%20AD%20Data%20Extract%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-481171%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F285544%22%20target%3D%22_blank%22%3E%40joshuatoon%3C%2FA%3EGood%20to%20hear%20from%20you!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20running%20the%20Get-AzureADDevice%20-all%20but%20only%20get%20the%20ObjectID%2C%20DeviceID%2C%20Displayname%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ein%20the%20Azure%20portal%20under%20Azure%20Active%20Directory%20-%20Devices%20I%20can%20see%20the%20following%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F109955iB16B52C26E7B2D06%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22AzureAD_Screenshot%202019-04-23%20090255.png%22%20title%3D%22AzureAD_Screenshot%202019-04-23%20090255.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Faiza Qadri
Occasional Contributor

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

4 Replies
Highlighted

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...

@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. 

 

@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:

AzureAD_Screenshot 2019-04-23 090255.png

@Faiza Qadri as Joshua wrote combination of cmdlets should work in your case (Get-AzureADDevice, Get-AzureADDeviceRegisteredOwner).

 

Another alternative is to use old cmdlet which still works:

get-msoldevice -All -ReturnRegisteredOwners | ft DisplayName,Enabled,DeviceOsType,DeviceTrustType,DeviceTrustLevel,RegisteredOwners,ApproximateLastLogonTimestamp

 

But this doesn't return the compliant information. One method to list compliant status could be to list all devices via Graph API (https://developer.microsoft.com/en-us/graph/graph-explorer):

GET https://graph.microsoft.com/v1.0/devices

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies