1

For the Azure AD cmdlet, Get-AzureADUser, can someone point me to a reference of all possible fields?

The scenario...

I wanted to export users, including their manager. Here is the only way I found to do this:

https://stackoverflow.com/a/48778134

but I wanted to also flesh out first name, last name and other fields, and I couldn't guess correctly (e.g. firstname, userfirstname). I had to search for a lucky find: givenname and surname, but what are the others??

I would have thought that the Microsoft reference page for Get-AzureADUser would at least have a link to a reference of the returned object, including its properties, but I can't find such a thing. I also typed user into the search on the left, since it is the object returned--nothing.

1
  • I was able to find documentation on this without much fanfare. – Ramhound Feb 12 '20 at 20:08
1

To see a list of all the attributes on an Azure AD user object:

Get-AzureADUser -Top 1 | gm -MemberType Properties

To see an Azure user and all their properties:

Get-AzureADUser -Top 1 | Format-List

To see an Azure user and all its properties, including Manager, and export to csv:

Get-AzureADUser -Top 1 | 
  Select-Object *,@{label="Manager";expression={(Get-AzureADUserManager -ObjectId $_.ObjectID).displayname}} | 
  Export-Csv \\path\to\file.csv

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.