Forum Discussion

jcasqueiro's avatar
jcasqueiro
Brass Contributor
Oct 13, 2023
Solved

Exporting users to a csv file with all attributes (normal and extended)

Hi, In  O365 I can export all tenant users to a csv file through the admin console but the extended attributes don't show up. Is there  script that allows me to create a csv file with all the users...
  • VasilMichev's avatar
    VasilMichev
    Oct 14, 2023
    Extension attributes can only be fetched via the Graph cmdlets, and you need to specifically request them. So something like this:

    Get-MgBetaUser -UserId blabla -Property Id,UserPrincipalName, extension_fe2174665583431c953114ff7268b7b3_Education_ObjectType,
    extension_fe2174665583431c953114ff7268b7b3_Education_AnchorId, ... | select Id,UserPrincipalName, extension_fe2174665583431c953114ff7268b7b3_Education_ObjectType,
    extension_fe2174665583431c953114ff7268b7b3_Education_AnchorId, ...

Resources