You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何通过ProxyAddresses在Azure B2C中查找重复用户?

查找Azure B2C中占用指定ProxyAddresses的对象

方法1:使用Microsoft Graph PowerShell模块

  • 安装并连接模块(需管理员权限):
    Install-Module Microsoft.Graph.Users -Force
    Connect-MgGraph -Scopes User.Read.All
    
  • 替换your-proxy-address为目标地址,执行查询:
    Get-MgUser -Filter "proxyAddresses/any(x:x eq 'smtp:your-proxy-address')" -Select Id, DisplayName, UserPrincipalName, ProxyAddresses
    
    提示:如果是主邮箱地址(大写SMTP前缀),把smtp:替换为SMTP:

方法2:查找非用户对象(组/服务主体)

如果上述查询无结果,该ProxyAddresses可能属于组或服务主体,执行以下命令:

  • 查询组:
    Get-MgGroup -Filter "proxyAddresses/any(x:x eq 'smtp:your-proxy-address')" -Select Id, DisplayName, ProxyAddresses
    
  • 查询服务主体:
    Get-MgServicePrincipal -Filter "proxyAddresses/any(x:x eq 'smtp:your-proxy-address')" -Select Id, DisplayName, ProxyAddresses
    

方法3:使用Microsoft Graph API直接调用

发送GET请求(需携带User.Read.All权限的访问令牌):

  • 查询用户:
    https://graph.microsoft.com/v1.0/users?$filter=proxyAddresses/any(x:x eq 'smtp:your-proxy-address')&$select=id,displayName,userPrincipalName,proxyAddresses
    
  • 查询组:
    https://graph.microsoft.com/v1.0/groups?$filter=proxyAddresses/any(x:x eq 'smtp:your-proxy-address')&$select=id,displayName,proxyAddresses
    
  • 查询服务主体:
    https://graph.microsoft.com/v1.0/servicePrincipals?$filter=proxyAddresses/any(x:x eq 'smtp:your-proxy-address')&$select=id,displayName,proxyAddresses
    

内容的提问来源于stack exchange,提问作者Pedro

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 11:42:42