Skip to content

Commit 80db004

Browse files
authored
Merge pull request #9067 from MicrosoftDocs/genlin-patch-35
Update use-upn-matching-identity-sync.md
2 parents c68b901 + 9e82808 commit 80db004

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

support/entra/entra-id/user-prov-sync/use-upn-matching-identity-sync.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: How to use UPN matching for identity synchronization in Office 365, Azure, or Intune
33
description: Describes how to use UPN matching for identity synchronization in Office 365, Azure, or Intune.
4-
ms.date: 05/11/2020
4+
ms.date: 06/05/2025
55
ms.reviewer: willfid
66
ms.service: entra-id
7-
ms.custom: sap:Microsoft Entra Connect Sync, has-azure-ad-ps-ref
7+
ms.custom: sap:Microsoft Entra Connect Sync, no-azure-ad-ps-ref
88
---
99
# How to use UPN matching for identity synchronization in Office 365, Azure, or Intune
1010

@@ -37,19 +37,32 @@ The UPN matching process has the following technical limitations:
3737
3838
## How to use UPN matching to match an on-premises user to a cloud identity
3939

40-
[!INCLUDE [Azure AD PowerShell deprecation note](~/../support/reusable-content/msgraph-powershell/includes/aad-powershell-deprecation-note.md)]
41-
4240
To start the UPN matching process, follow these steps:
4341

44-
1. If you started syncing to Microsoft Entra ID before March 30, 2016, run the following Azure AD PowerShell cmdlet to enable UPN soft match for your organization only:
42+
1. If you started syncing to Microsoft Entra ID before March 30, 2016, run the following [Update-MgDirectoryOnPremiseSynchronization](/powershell/module/microsoft.graph.identity.directorymanagement/update-mgdirectoryonpremisesynchronization) cmdlet to enable UPN soft match for your organization only.
43+
44+
For more information, see [Get started with the Microsoft Graph PowerShell SDK](/powershell/microsoftgraph/get-started).
4545

4646
```powershell
47-
Set-MsolDirSyncFeature -Feature EnableSoftMatchOnUpn -Enable $True
47+
Import-Module Microsoft.Graph.Identity.DirectoryManagement
48+
49+
# Replace with your actual Directory Sync ID
50+
$onPremisesDirectorySynchronizationId = "<your-directory-sync-id>"
51+
52+
# Define the parameters to enable SoftMatchOnUpn
53+
$params = @{
54+
features = @{
55+
SoftMatchOnUpnEnabled = $true
56+
}
57+
}
58+
59+
# Run the update
60+
Update-MgDirectoryOnPremiseSynchronization -OnPremisesDirectorySynchronizationId $onPremisesDirectorySynchronizationId -BodyParameter $params
4861
```
4962
5063
> [!NOTE]
5164
> UPN soft match is automatically enabled for organizations that started syncing to Microsoft Entra ID on or after March 30, 2016.
52-
2. Obtain the UPN from the user account in Microsoft Entra ID. To do so, use one of the following methods:
65+
4. Obtain the UPN from the user account in Microsoft Entra ID. To do so, use one of the following methods:
5366
5467
- Method 1: Use the Office 365 portal.
5568
@@ -65,8 +78,8 @@ To start the UPN matching process, follow these steps:
6578
3. Go to the users management page.
6679
4. Find and then select the user.
6780
5. Note of the user name, which is the UPN.
68-
3. On a domain controller or a computer that has the Remote Server Administration Tools installed (RSAT), open Active Directory Users and Computers. Create a user account, or update an existing user account, by using a user name/UPN that matches the target user account in Microsoft Entra ID. For more information, see [Create a User Account in Active Directory Users and Computers](/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd894463(v=ws.10)).
69-
4. Force directory synchronization. For more information, see [Force directory synchronization](https://techcommunity.microsoft.com/t5/itops-talk-blog/powershell-basics-how-to-force-azuread-connect-to-sync/ba-p/887043).
81+
5. On a domain controller or a computer that has the Remote Server Administration Tools installed (RSAT), open Active Directory Users and Computers. Create a user account, or update an existing user account, by using a user name/UPN that matches the target user account in Microsoft Entra ID. For more information, see [Create a User Account in Active Directory Users and Computers](/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd894463(v=ws.10)).
82+
6. Force directory synchronization. For more information, see [Force directory synchronization](https://techcommunity.microsoft.com/t5/itops-talk-blog/powershell-basics-how-to-force-azuread-connect-to-sync/ba-p/887043).
7083
7184
## More information
7285

0 commit comments

Comments
 (0)