azure-active-directory - Locating a user by alternate email address in Azure AD
问题描述
I currently use
(Get-MsolUser -UserPrincipalName $EmailAddress).ObjectID.Guid
to lookup a user by their PrincipalName in Azure AD and return their guid. However, there are times when a user has changed email addresses due to a name change and the address I have been given is not their PrincipalName but a secondary email address.
Is there a way to locate a user based upon an alternate email address? Perhaps a fuzzy search?
解决方案
根据租户中“用户”帐户的数量,返回每个用户帐户可能需要一些时间。请参阅以下内容:
Get-MsolUser -all | Where{$_.ProxyAddresses -like "smtp:<EMAIL ADDRESS>"}
(Get-MsolUser -all | Where{$_.ProxyAddresses -like "smtp:<EMAIL ADDRESS>"}).ObjectId.Guid
推荐阅读
- linux - Linux 和 Windows 之间的文本编码
- gatsby - 在 Gatsby 中使用 Tailwind (SCSS)
- flutter - Flutter 重启后从本地目录中删除文件
- javascript - 来自 Angular http 的 JSON 对象没有正确反序列化
- c# - 在 C# 的 for 循环中从列表中获取数据
- r - 条形图颜色与姓名频率的累积总和不匹配
- typescript - isArray 检查和推断类型从不在 TypeScript 中
- android - 在浮动操作按钮旁边添加标签
- flutter - Flutter - 覆盖容器高度问题
- node.js - 猫鼬填充自定义对象数组