@Glenn Maxwell
If you want to do this with Azure AD cmdlets, you first of all need to make sure that all the user properties are accessible from Azure AD, in particular the extension attribute, you want to export.
Have a look here for instance: using-ad-extensionattributes-in-azure-ad
Why? Because AD extension attributes aren't synced by AD Connect by default - only if you specified this previously already.
Afterwards, you can access the AD User Extension attributes by means of Get-AzureADUserExtension cmdlet.
Just consider, if you want to make these extension attributes accessible by means of Azure AD in advance, e.g. you might do not want to make "employeeID" or "employeeNumber" accessible as you may store sensitive data.
Using the Acitve Directory PowerShell module, you should find lots of resource by a simple Google search request, e.g.:
import-module activedirectory
Get-ADUser -Filter {department -eq "IT"} | Select sAMAccountName, givenName, sn | Export-Csv -Path c:\Scripts\Users.csv
(Source: powershell-get-aduser-filtering-department.html)
Last but not least, depending on the amount of user in your AD, it is maybe even easier if you simply get all user's desired attributes to a csv first and filter the csv output by means of Microsoft Excel / Power Query (Get & Transform).
get-aduser -properties * | select displayname, department, departmentnumber, title | export-csv c:\path\to\your.csv
(Source: user-get-aduser-to-list-all-properties-and-export-to-csv)
PS: Make sure to use an elevated PowerShell session.
PPS: This is just a rough guideline. Code is untested.