Skip to content

Commit 1d8be76

Browse files
committed
Update howto-sspr-authenticationdata.md
1 parent a792fb5 commit 1d8be76

File tree

1 file changed

+25
-63
lines changed

1 file changed

+25
-63
lines changed

articles/active-directory/authentication/howto-sspr-authenticationdata.md

Lines changed: 25 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services: active-directory
66
ms.service: active-directory
77
ms.subservice: authentication
88
ms.topic: how-to
9-
ms.date: 01/29/2023
9+
ms.date: 04/26/2023
1010

1111
ms.author: justinha
1212
author: justinha
@@ -82,45 +82,46 @@ The following fields can be set through PowerShell:
8282
> [!IMPORTANT]
8383
> Azure AD PowerShell is planned for deprecation. You can start using [Microsoft Graph PowerShell](/powershell/microsoftgraph/overview) to interact with Azure AD as you would in Azure AD PowerShell, or use the [Microsoft Graph REST API for managing authentication methods](/graph/api/resources/authenticationmethods-overview).
8484
85-
### Use Azure AD PowerShell version 1
85+
### Use Microsoft Graph PowerShell
8686

87-
To get started, [download and install the Azure AD PowerShell module](/previous-versions/azure/jj151815(v=azure.100)#bkmk_installmodule). After it's installed, use the following steps to configure each field.
87+
To get started, [download and install the Microsoft Graph PowerShell module](/powershell/microsoftgraph/overview).
8888

89-
#### Set the authentication data with Azure AD PowerShell version 1
89+
To quickly install from recent versions of PowerShell that support `Install-Module`, run the following commands. The first line checks to see if the module is already installed:
9090

9191
```PowerShell
92-
Connect-MsolService
93-
94-
Set-MsolUser -UserPrincipalName [email protected] -AlternateEmailAddresses @("[email protected]")
95-
Set-MsolUser -UserPrincipalName [email protected] -MobilePhone "+1 4251234567"
96-
Set-MsolUser -UserPrincipalName [email protected] -PhoneNumber "+1 4252345678"
97-
98-
Set-MsolUser -UserPrincipalName [email protected] -AlternateEmailAddresses @("[email protected]") -MobilePhone "+1 4251234567" -PhoneNumber "+1 4252345678"
92+
Get-Module Microsoft.Graph
93+
Install-Module Microsoft.Graph
94+
Select-MgProfile -Name "beta"
95+
Connect-MgGraph -Scopes "User.ReadWrite.All"
9996
```
10097

101-
#### Read the authentication data with Azure AD PowerShell version 1
98+
After the module is installed, use the following steps to configure each field.
99+
100+
#### Set the authentication data with Microsoft Graph PowerShell
102101

103102
```PowerShell
104-
Connect-MsolService
103+
Connect-MgGraph -Scopes "User.ReadWrite.All"
105104
106-
Get-MsolUser -UserPrincipalName [email protected] | select AlternateEmailAddresses
107-
Get-MsolUser -UserPrincipalName [email protected] | select MobilePhone
108-
Get-MsolUser -UserPrincipalName [email protected] | select PhoneNumber
105+
Update-MgUser -UserId '[email protected]' -otherMails @("[email protected]")
106+
Update-MgUser -UserId '[email protected]' -mobilePhone "+1 4251234567"
107+
Update-MgUser -UserId '[email protected]' -businessPhones "+1 4252345678"
109108
110-
Get-MsolUser | select DisplayName,UserPrincipalName,AlternateEmailAddresses,MobilePhone,PhoneNumber | Format-Table
109+
Update-MgUser -UserId '[email protected]' -otherMails @("[email protected]") -mobilePhone "+1 4251234567" -businessPhones "+1 4252345678"
111110
```
112111

113-
#### Read the Authentication Phone and Authentication Email options
114-
115-
To read the **Authentication Phone** and **Authentication Email** when you use PowerShell version 1, use the following commands:
112+
#### Read the authentication data with Microsoft Graph PowerShell
116113

117114
```PowerShell
118-
Connect-MsolService
119-
Get-MsolUser -UserPrincipalName [email protected] | select -Expand StrongAuthenticationUserDetails | select PhoneNumber
120-
Get-MsolUser -UserPrincipalName [email protected] | select -Expand StrongAuthenticationUserDetails | select Email
115+
Connect-MgGraph -Scopes "User.Read.All"
116+
117+
Get-MgUser -UserId '[email protected]' | select otherMails
118+
Get-MgUser -UserId '[email protected]' | select mobilePhone
119+
Get-MgUser -UserId '[email protected]' | select businessPhones
120+
121+
Get-MgUser -UserId '[email protected]' | Select businessPhones, mobilePhone, otherMails | Format-Table
121122
```
122123

123-
### Use Azure AD PowerShell version 2
124+
### Use Azure AD PowerShell
124125

125126
To get started, [download and install the Azure AD version 2 PowerShell module](/powershell/module/azuread/).
126127

@@ -158,45 +159,6 @@ Get-AzureADUser -ObjectID [email protected] | select TelephoneNumber
158159
Get-AzureADUser | select DisplayName,UserPrincipalName,otherMails,Mobile,TelephoneNumber | Format-Table
159160
```
160161

161-
### Use Microsoft Graph PowerShell
162-
163-
To get started, [download and install the Microsoft Graph PowerShell module](/powershell/microsoftgraph/overview).
164-
165-
To quickly install from recent versions of PowerShell that support `Install-Module`, run the following commands. The first line checks to see if the module is already installed:
166-
167-
```PowerShell
168-
Get-Module Microsoft.Graph
169-
Install-Module Microsoft.Graph
170-
Select-MgProfile -Name "beta"
171-
Connect-MgGraph -Scopes "User.ReadWrite.All"
172-
```
173-
174-
After the module is installed, use the following steps to configure each field.
175-
176-
#### Set the authentication data with Microsoft Graph PowerShell
177-
178-
```PowerShell
179-
Connect-MgGraph -Scopes "User.ReadWrite.All"
180-
181-
Update-MgUser -UserId '[email protected]' -otherMails @("[email protected]")
182-
Update-MgUser -UserId '[email protected]' -mobilePhone "+1 4251234567"
183-
Update-MgUser -UserId '[email protected]' -businessPhones "+1 4252345678"
184-
185-
Update-MgUser -UserId '[email protected]' -otherMails @("[email protected]") -mobilePhone "+1 4251234567" -businessPhones "+1 4252345678"
186-
```
187-
188-
#### Read the authentication data with Microsoft Graph PowerShell
189-
190-
```PowerShell
191-
Connect-MgGraph -Scopes "User.Read.All"
192-
193-
Get-MgUser -UserId '[email protected]' | select otherMails
194-
Get-MgUser -UserId '[email protected]' | select mobilePhone
195-
Get-MgUser -UserId '[email protected]' | select businessPhones
196-
197-
Get-MgUser -UserId '[email protected]' | Select businessPhones, mobilePhone, otherMails | Format-Table
198-
```
199-
200162
## Next steps
201163

202164
Once authentication contact information is pre-populated for users, complete the following tutorial to enable self-service password reset:

0 commit comments

Comments
 (0)