简体   繁体   English

从AzureAD提取特定信息

[英]Extracting specific information from AzureAD

I'm attempting to extract the "employeeID" from all users held within my AzureAD site. 我试图从我的AzureAD网站内持有的所有用户中提取“ employeeID”。 Currently i'm using: Get-AzureADUser -ObjectId "email" | Select-Object -ExpandProperty extensionproperty 当前我正在使用: 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 这有效并获得了employeeID,但是,它还会提取其他信息

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"]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure Python SDK问题-从RoleInstance中提取终结点信息 - Azure Python SDK Issue - Extracting endpoint information from RoleInstance 如何从AzureAD与另一个组织的AzureAD联合 - How do I federate from my AzureAD with another organisation's AzureAD AzureAD 不接受来自我的 NodeJS OAuth2 的 HTTP URL - AzureAD not accepting my HTTP URL from my NodeJS OAuth2 从 .NET 框架 4.7.2 升级到 .NET 6 后无法验证 AzureAD - Can not authenticate AzureAD after upgrading to .NET 6 from .NET framework 4.7.2 图 API 正在从我在 AzureAD 中的企业应用程序中删除证书 - Graph API is removing certificates from my Enterprise Application in AzureAD 我们可以将用户的照片从AzureAD同步到AD DS吗? - Can we sync users' photos from AzureAD to AD DS? 如何将AzureAD身份验证的应用程序从开发机移动到服务器? - How to move an AzureAD authenticated app from dev machine to server? 从受保护的 AzureAD 获取 ClaimsPrincipal/Identity powershell 核心 Azure Function - Get ClaimsPrincipal/Identity from AzureAD secured powershell core Azure Function 我想创建一个返回基本 AzureAD 信息而不将其绑定到一个租户的程序 - I'd like to create a program that returns basic AzureAD information without tying it to one tenant 与本地相比,从Azure运行时,Powershell AzureAD模块返回不同的对象 - Powershell AzureAD module returns different objects when running from Azure compared to locally
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM