Skip to content

Commit 28038e4

Browse files
authored
Merge pull request #204492 from tilarso/patch-26
Include steps to use MG PowerShell
2 parents c6a54d6 + 08a090f commit 28038e4

File tree

1 file changed

+50
-11
lines changed

1 file changed

+50
-11
lines changed

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

Lines changed: 50 additions & 11 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: 10/05/2020
9+
ms.date: 07/12/2022
1010

1111
ms.author: justinha
1212
author: justinha
@@ -18,7 +18,7 @@ ms.custom: devx-track-azurepowershell
1818
---
1919
# Pre-populate user authentication contact information for Azure Active Directory self-service password reset (SSPR)
2020

21-
To use Azure Active Directory (Azure AD) self-service password reset (SSPR), authentication contact information for a user must be present. Some organizations have users register their authentication data themselves. Other organizations prefer to synchronize from authentication data that already exists in Active Directory Domain Services (AD DS). This synchronized data is made available to Azure AD and SSPR without requiring user interaction. When users need to change or reset their password, they can do so even if they haven't previously registered their contact information.
21+
To use Azure Active Directory (Azure AD) self-service password reset (SSPR), authentication information for a user must be present. Most organizations have users register their authentication data themselves while collecting information for MFA. Some organizations prefer to bootstrap this process through synchronization of authentication data that already exists in Active Directory Domain Services (AD DS). This synchronized data is made available to Azure AD and SSPR without requiring user interaction. When users need to change or reset their password, they can do so even if they haven't previously registered their contact information.
2222

2323
You can pre-populate authentication contact information if you meet the following requirements:
2424

@@ -80,13 +80,13 @@ The following fields can be set through PowerShell:
8080
* Can only be set if you're not synchronizing with an on-premises directory.
8181

8282
> [!IMPORTANT]
83-
> There's a known lack of parity in command features between PowerShell v1 and PowerShell v2. The [Microsoft Graph REST API (beta) for authentication methods](/graph/api/resources/authenticationmethods-overview) is the current engineering focus to provide modern interaction.
83+
> 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 PowerShell version 1
85+
### Use Azure AD PowerShell version 1
8686

8787
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.
8888

89-
#### Set the authentication data with PowerShell version 1
89+
#### Set the authentication data with Azure AD PowerShell version 1
9090

9191
```PowerShell
9292
Connect-MsolService
@@ -98,7 +98,7 @@ Set-MsolUser -UserPrincipalName [email protected] -PhoneNumber "+1 4252345678"
9898
Set-MsolUser -UserPrincipalName [email protected] -AlternateEmailAddresses @("[email protected]") -MobilePhone "+1 4251234567" -PhoneNumber "+1 4252345678"
9999
```
100100

101-
#### Read the authentication data with PowerShell version 1
101+
#### Read the authentication data with Azure AD PowerShell version 1
102102

103103
```PowerShell
104104
Connect-MsolService
@@ -120,21 +120,21 @@ Get-MsolUser -UserPrincipalName [email protected] | select -Expand StrongAuthentic
120120
Get-MsolUser -UserPrincipalName [email protected] | select -Expand StrongAuthenticationUserDetails | select Email
121121
```
122122

123-
### Use PowerShell version 2
123+
### Use Azure AD PowerShell version 2
124124

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

127127
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:
128128

129129
```PowerShell
130-
Get-Module AzureADPreview
131-
Install-Module AzureADPreview
130+
Get-Module AzureAD
131+
Install-Module AzureAD
132132
Connect-AzureAD
133133
```
134134

135135
After the module is installed, use the following steps to configure each field.
136136

137-
#### Set the authentication data with PowerShell version 2
137+
#### Set the authentication data with Azure AD PowerShell version 2
138138

139139
```PowerShell
140140
Connect-AzureAD
@@ -146,7 +146,7 @@ Set-AzureADUser -ObjectId [email protected] -TelephoneNumber "+1 4252345678"
146146
Set-AzureADUser -ObjectId [email protected] -OtherMails @("[email protected]") -Mobile "+1 4251234567" -TelephoneNumber "+1 4252345678"
147147
```
148148

149-
#### Read the authentication data with PowerShell version 2
149+
#### Read the authentication data with Azure AD PowerShell version 2
150150

151151
```PowerShell
152152
Connect-AzureAD
@@ -158,6 +158,45 @@ Get-AzureADUser -ObjectID [email protected] | select TelephoneNumber
158158
Get-AzureADUser | select DisplayName,UserPrincipalName,otherMails,Mobile,TelephoneNumber | Format-Table
159159
```
160160

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+
161200
## Next steps
162201

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

0 commit comments

Comments
 (0)