如何使用 Graph API 查找已兑换或未兑换的 azure AD 来宾用户邀请

How to find azure AD guest user invitation has redeemed or not using Graph API

我需要查找来宾用户是否已兑换邀请。当我从 Graph API 获取用户详细信息时,返回的用户没有此类信息。

但在 Azure 门户中,当用户兑换邀请时,我可以看到身份部分下的来源 属性 正在更改为 Microsoft 帐户或来自 "Invited user" 的类似内容。

查看 azureaduser 上的扩展属性...它具有邀请的用户状态。

示例:

(Get-AzureADUser -SearchString 'insertusername').ExtensionProperty

扩展 属性 显示:SEE USERSTATE "pendingacceptance"

Key                         Value                           
---                         -----                           
odata.type                  Microsoft.DirectoryServices.User
ageGroup                                                    
consentProvidedForMinor                                     
createdDateTime             7/09/2018 6:49:38 AM            
employeeId                                                  
legalAgeGroupClassification                                 
onPremisesDistinguishedName                                 
userIdentities              []                              
userState                   PendingAcceptance               
userStateChangedOn          7/09/2018 6:49:35 AM