Skip to content

Commit df6f4df

Browse files
committed
Learn Editor: Update error-code-AADSTS50020-user-account-identity-provider-does-not-exist.md
1 parent 4b8b254 commit df6f4df

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

support/entra/entra-id/app-integration/error-code-AADSTS50020-user-account-identity-provider-does-not-exist.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Error `AADSTS50020` might occur if the name of a guest user who was deleted in a
134134

135135
### Verification option 1: Check whether the resource tenant's guest user is older than the home tenant's user account
136136

137-
The first verification option involves comparing the age of the resource tenant's guest user against the home tenant's user account. You can make this verification by using Microsoft Graph or MSOnline PowerShell.
137+
The first verification option involves comparing the age of the resource tenant's guest user against the home tenant's user account. You can make this verification by using Microsoft Graph, Microsoft Entra PowerShell or Microsoft Graph PowerShell SDK
138138

139139
#### Microsoft Graph
140140

@@ -155,21 +155,26 @@ GET https://graph.microsoft.com/v1.0/users/{id | userPrincipalName}/createdDateT
155155

156156
Then, check the creation date of the guest user in the resource tenant against the creation date of the user account in the home tenant. The scenario is confirmed if the guest user was created before the home tenant's user account was created.
157157

158-
#### MSOnline PowerShell
158+
#### Microsoft Entra PowerShell
159159

160-
> [!NOTE]
161-
> The [MSOnline PowerShell module](/powershell/azure/active-directory/install-msonlinev1) is set to be deprecated.
162-
> Because it's also incompatible with PowerShell Core, make sure that you're using a compatible PowerShell version so that you can run the following commands.
160+
Run the [Get-EntraUser](/powershell/module/microsoft.entra/get-entrauser) PowerShell cmdlet to review the user creation date, as follows:
163161

164-
Run the [Get-MsolUser](/powershell/module/msonline/get-msoluser) PowerShell cmdlet to review the user creation date, as follows:
165-
166-
```azurepowershell
167-
Get-MsolUser -SearchString [email protected] | Format-List whenCreated
162+
```powershell
163+
Get-EntraUser -UserId {id | userPrincipalName} | Select-Object id, userPrincipalName, createdDateTime
168164
```
169165

170166
Then, check the creation date of the guest user in the resource tenant against the creation date of the user account in the home tenant. The scenario is confirmed if the guest user was created before the home tenant's user account was created.
171167

172-
[!INCLUDE [Azure AD PowerShell deprecation note](~/../support/reusable-content/msgraph-powershell/includes/aad-powershell-deprecation-note.md)]
168+
#### Microsoft Graph PowerShell SDK
169+
170+
Run the [Get-MgUser](/powershell/module/microsoft.graph.users/get-mguser) PowerShell cmdlet to review the user creation date, as follows:
171+
172+
```powershell
173+
$p = @('Id', 'UserPrincipalName', 'CreatedDateTime')
174+
Get-MgUser -UserId {id | userPrincipalName} -Property $p| Select-Object $p
175+
```
176+
177+
Then, check the creation date of the guest user in the resource tenant against the creation date of the user account in the home tenant. The scenario is confirmed if the guest user was created before the home tenant's user account was created.
173178

174179
### Verification option 2: Check whether the resource tenant's guest alternative security ID differs from the home tenant's user net ID
175180

0 commit comments

Comments
 (0)