简体   繁体   中英

Azure Powershell: Get-AzureADUser othermails not visible

When I run the get-AzureADUser -objectID someone@contoso.com | Select Displayname,Othermails get-AzureADUser -objectID someone@contoso.com | Select Displayname,Othermails I cannot see the othermails property. The property turns up as:

OtherMails: {}

I would like to see this property, to check if everyone in the organisation has an authentication method filled in. So they can use the SSPR.

I am using the tenant administrator account. So I should be able to see everything. In the GUI of Azure AD, when I click on a user and authentication methods. I can see that the emailaddress is there. But it turns up blanc in Powershell.

Anyone has a clue why this is?

For getting SSPR information you need to use Get-MsolUser cmdlet. The data included under StrongAuthenticationUserDetails is the one you can see under Authentication methods :

$t = Get-MsolUser -UserPrincipalName upn@domain.com
$t.StrongAuthenticationUserDetails

# Returns

ExtensionData          : System.Runtime.Serialization.ExtensionDataObject
AlternativePhoneNumber :
Email                  : email@gmail.com
OldPin                 :
PhoneNumber            : +48 123456789
Pin                    :

There are other fields, which can be used for SSPR (such as alternate email address), but they won't be displayed under Authentication methods .

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM