I'm attempting to extract the "employeeID" from all users held within my AzureAD site. Currently i'm using: Get-AzureADUser -ObjectId "email" | Select-Object -ExpandProperty extensionproperty
Get-AzureADUser -ObjectId "email" | Select-Object -ExpandProperty extensionproperty
This works and gets me the employeeID, however, it also pulls additional information
output:
Key Value
--- -----
odata.metadata https://graph.windows.net/0a138b97-aedc-4e06-875a-44803cfcd8c1/$metadata#dir...
odata.type Microsoft.DirectoryServices.User
createdDateTime 20/03/2019 10:47:23
employeeId x
onPremisesDistinguishedName x
userIdentities []
extension_dfb221e9879e4fa2bd42bc4c8f90eeed_employeeID x
My question is, how exactly do I pull JUST the employeeid information?
由于ExtensionProperty
是一个Dictionary对象,因此您需要使用以下方法从其中提取EmployeeId
值:
(Get-AzureADUser -ObjectId "email").ExtensionProperty["employeeId"]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.