Skip to content

Commit 622faa6

Browse files
authored
Merge pull request #207391 from Jak-MS/public-move-96868-2
public move PR 96868 - Updating Image tags and formatting
2 parents d37b566 + 3c5ffd0 commit 622faa6

File tree

1 file changed

+75
-31
lines changed

1 file changed

+75
-31
lines changed

articles/active-directory/hybrid/how-to-connect-sync-staging-server.md

Lines changed: 75 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ ms.author: billmath
1818
ms.collection: M365-identity-device-management
1919
---
2020
# Azure AD Connect: Staging server and disaster recovery
21+
2122
With a server in staging mode, you can make changes to the configuration and preview the changes before you make the server active. It also allows you to run full import and full synchronization to verify that all changes are expected before you make these changes into your production environment.
2223

2324
## Staging mode
25+
2426
Staging mode can be used for several scenarios, including:
2527

2628
* High availability.
@@ -41,6 +43,7 @@ A server in staging mode continues to receive changes from Active Directory and
4143
For those of you with knowledge of older sync technologies, the staging mode is different since the server has its own SQL database. This architecture allows the staging mode server to be located in a different datacenter.
4244

4345
### Verify the configuration of a server
46+
4447
To apply this method, follow these steps:
4548

4649
1. [Prepare](#prepare)
@@ -50,14 +53,17 @@ To apply this method, follow these steps:
5053
5. [Switch active server](#switch-active-server)
5154

5255
#### Prepare
56+
5357
1. Install Azure AD Connect, select **staging mode**, and unselect **start synchronization** on the last page in the installation wizard. This mode allows you to run the sync engine manually.
5458
![Screenshot shows the Ready to configure page in the Azure AD Connect dialog box.](./media/how-to-connect-sync-staging-server/readytoconfigure.png)
5559
2. Sign off/sign in and from the start menu select **Synchronization Service**.
5660

5761
#### Configuration
62+
5863
If you have made custom changes to the primary server and want to compare the configuration with the staging server, then use [Azure AD Connect configuration documenter](https://github.com/Microsoft/AADConnectConfigDocumenter).
5964

6065
#### Import and Synchronize
66+
6167
1. Select **Connectors**, and select the first Connector with the type **Active Directory Domain Services**. Click **Run**, select **Full import**, and **OK**. Do these steps for all Connectors of this type.
6268
2. Select the Connector with type **Azure Active Directory (Microsoft)**. Click **Run**, select **Full import**, and **OK**.
6369
3. Make sure the tab Connectors is still selected. For each Connector with type **Active Directory Domain Services**, click **Run**, select **Delta Synchronization**, and **OK**.
@@ -66,6 +72,7 @@ If you have made custom changes to the primary server and want to compare the co
6672
You have now staged export changes to Azure AD and on-premises AD (if you are using Exchange hybrid deployment). The next steps allow you to inspect what is about to change before you actually start the export to the directories.
6773

6874
#### Verify
75+
6976
1. Start a cmd prompt and go to `%ProgramFiles%\Microsoft Azure AD Sync\bin`
7077
2. Run: `csexport "Name of Connector" %temp%\export.xml /f:x`
7178
The name of the Connector can be found in Synchronization Service. It has a name similar to "contoso.com – Azure AD" for Azure AD.
@@ -74,22 +81,26 @@ You have a file in %temp% named export.csv that can be examined in Microsoft Exc
7481
4. Make necessary changes to the data or configuration and run these steps again (Import and Synchronize and Verify) until the changes that are about to be exported are expected.
7582

7683
**Understanding the export.csv file**
84+
7785
Most of the file is self-explanatory. Some abbreviations to understand the content:
7886
* OMODT – Object Modification Type. Indicates if the operation at an object level is an Add, Update, or Delete.
7987
* AMODT – Attribute Modification Type. Indicates if the operation at an attribute level is an Add, Update, or delete.
8088

8189
**Retrieve common identifiers**
90+
8291
The export.csv file contains all changes that are about to be exported. Each row corresponds to a change for an object in the connector space and the object is identified by the DN attribute. The DN attribute is a unique identifier assigned to an object in the connector space. When you have many rows/changes in the export.csv to analyze, it may be difficult for you to figure out which objects the changes are for based on the DN attribute alone. To simplify the process of analyzing the changes, use the `csanalyzer.ps1` PowerShell script. The script retrieves common identifiers (for example, displayName, userPrincipalName) of the objects. To use the script:
8392
1. Copy the PowerShell script from the section [CSAnalyzer](#appendix-csanalyzer) to a file named `csanalyzer.ps1`.
8493
2. Open a PowerShell window and browse to the folder where you created the PowerShell script.
8594
3. Run: `.\csanalyzer.ps1 -xmltoimport %temp%\export.xml`.
8695
4. You now have a file named **processedusers1.csv** that can be examined in Microsoft Excel. Note that the file provides a mapping from the DN attribute to common identifiers (for example, displayName and userPrincipalName). It currently does not include the actual attribute changes that are about to be exported.
8796

8897
#### Switch active server
98+
8999
Azure AD Connect can be set up in an Active-Passive High Availability setup, where one server will actively push changes to the synced AD objects to Azure AD and the passive server will stage these changes in the event it will need to take over.
90100

91-
Note: You cannot set up Azure AD Connect in an Active-Active setup. It must be Active-Passive
92-
Ensure that only 1 Azure AD Connect server is actively syncing changes.
101+
>[!Note]
102+
>
103+
>You cannot set up Azure AD Connect in an Active-Active setup. It must be Active-Passive. Ensure that only 1 Azure AD Connect server is actively syncing changes.
93104
94105
For more information on setting up an Azure AD Connect sync server in Staging Mode, see [staging mode](how-to-connect-sync-staging-server.md)
95106

@@ -100,58 +111,85 @@ You may need to perform a failover of the Sync Servers for several reasons, such
100111
- One currently active Azure AD Connect Sync Server
101112
- One staging Azure AD Connect Sync Server
102113

103-
#### Changing Currently Active Sync Server to Staging Mode
114+
#### Change currently Active Sync Server to staging mode
104115

105116
We need to ensure that only one Sync Server is syncing changes at any given time throughout this process. If the currently Active Sync Server is reachable you can perform the below steps to move it to Staging Mode. If it is not reachable, ensure that the server or VM does not regain access unexpectedly either by shutting down the server or isolating it from outbound connections and proceed to the steps on how to change the currently Staging Sync Server to Active Mode.
106117

107-
1. For the currently Active Azure AD Connect server, open the Azure AD Connect Console and click "Configure staging mode" then Next:
108-
[Insert Image: "active_server_menu.png"]
118+
1. For the currently Active Azure AD Connect server, open the Azure AD Connect Console and click "Configure staging mode" then Next:
119+
120+
> [!div class="mx-imgBorder"]
121+
> ![Screenshot shows Staging Mode highlighted in the Active Azure AD Connect dialog box.](media/how-to-connect-sync-staging-server/active-server-menu.png)
122+
123+
2. You will need to sign into Azure AD with Global Admin or Hybrid Identity Admin credentials:
109124

110-
2. You will need to sign into Azure AD with Global Admin or Hybrid Identity Admin credentials:
111-
[Insert Image: "active_server_sign_in.png"]
125+
> [!div class="mx-imgBorder"]
126+
> ![Screenshot shows Sign in prompt in the Active Azure AD Connect dialog box.](media/how-to-connect-sync-staging-server/active-server-sign-in.png)
112127
113-
3. Tick the box for Staging Mode and click Next:
114-
[Insert Image: "active_server_staging_mode.png"]
128+
3. Tick the box for Staging Mode and click Next:
115129

116-
4. The Azure AD Connect server will check for installed components and then prompt you whether you want to start the sync process:
117-
[Insert Image: "active_server_config.png"]
118-
Since the server will be in staging mode, it will not write changes to Azure AD, but retain any changes to the AD in its Connector Space, ready to write them.
130+
> [!div class="mx-imgBorder"]
131+
> ![Screenshot shows Staging Mode configuration in the Active Azure AD Connect dialog box.](media/how-to-connect-sync-staging-server/active-server-staging-mode.png)
132+
133+
4. The Azure AD Connect server will check for installed components and then prompt you whether you want to start the sync process:
134+
135+
> [!div class="mx-imgBorder"]
136+
> ![Screenshot shows Ready to Configure screen in the Active Azure AD Connect dialog box.](media/how-to-connect-sync-staging-server/active-server-config.png)
137+
138+
Since the server will be in staging mode, it will not write changes to Azure AD, but retain any changes to the AD in its Connector Space, ready to write them.
119139
It is recommended to leave the sync process on for the server in Staging Mode, so if it becomes active, it will quickly take over and won't have to do a large sync to catch up to the current state of the AD/Azure AD sync.
120140

121-
5. After selecting whether to start or stop the sync process and clicking Configure, the Azure AD Connect server will configure itself into Staging Mode.
122-
When this is completed, you will be prompted with a screen that confirms Staging Mode is enabled.
141+
5. After selecting whether to start or stop the sync process and clicking Configure, the Azure AD Connect server will configure itself into Staging Mode.
142+
When this is completed, you will be prompted with a screen that confirms Staging Mode is enabled.
123143
You can click Exit to finish this.
124144

125-
6. You can confirm that the server is successfully in Staging Mode by opening the Synchronization Service console.
126-
From here, there should be no more Export jobs since the change and Full & Delta Imports will be suffixed with "(Stage Only)" like below:
127-
[Insert Image "active_server_sync_server_mgmr.png"]
145+
6. You can confirm that the server is successfully in Staging Mode by opening the Synchronization Service console.
146+
From here, there should be no more Export jobs since the change and Full & Delta Imports will be suffixed with "(Stage Only)" like below:
147+
148+
> [!div class="mx-imgBorder"]
149+
> ![Screenshot shows Sync Service console on the Active Azure AD Connect dialog box.](media/how-to-connect-sync-staging-server/active-server-sync-server-mgmr.png)
128150
129-
#### Changing Currently Staging Sync Server to Active Mode
151+
#### Change current Staging Sync server to active mode
130152

131153
At this point, all of our Azure AD Connect Sync Servers should be in Staging Mode and not exporting changes.
132154
We can now move our Staging Sync Server to Active mode and actively sync changes.
133155

134-
1. Now move to the Azure AD Connect server that was originally in Staging Mode and open the Azure AD Connect console.
135-
Click on "Configure staging mode" and click Next:
136-
[Insert Image: "staging_server_menu.png"]
137-
Note the message at the bottom of the Console that indicates this server is in Staging Mode.
156+
1. Now move to the Azure AD Connect server that was originally in Staging Mode and open the Azure AD Connect console.
157+
158+
Click on "Configure staging mode" and click Next:
159+
160+
> [!div class="mx-imgBorder"]
161+
> ![Screenshot shows Staging Mode highlighted in the Staging Azure AD Connect dialog box.](media/how-to-connect-sync-staging-server/staging-server-menu.png)
162+
163+
The message at the bottom of the Console indicates this server is in Staging Mode.
138164

139165
2. Sign into Azure AD, then go to the Staging Mode screen.
140-
Untick the box for Staging Mode and click Next
141-
[Insert Image: "staging_server_staging_mode.png"]
142-
As per the warning on this page, it is important to ensure no other Azure AD Connect server is actively syncing.
143-
There should only be one active Azure AD Connect sync server at any time.
144166

145-
3. When you are prompted to start the sync process, tick this box and click Configure:
146-
[Insert Image: "staging_server_config.png"]
167+
Untick the box for Staging Mode and click Next
168+
169+
> [!div class="mx-imgBorder"]
170+
> ![Screenshot shows Staging Mode configuration in the Staging Azure AD Connect dialog box.](media/how-to-connect-sync-staging-server/staging-server-staging-mode.png)
171+
172+
As per the warning on this page, it is important to ensure no other Azure AD Connect server is actively syncing.
173+
174+
There should only be one active Azure AD Connect sync server at any time.
175+
176+
3. When you are prompted to start the sync process, tick this box and click Configure:
177+
178+
> [!div class="mx-imgBorder"]
179+
> ![Screenshot shows Ready to Configure screen in the Staging Azure AD Connect dialog box.](media/how-to-connect-sync-staging-server/staging-server-config.png)
147180
148-
4. Once the process is finished you should get the below confirmation screen where you can click Exit to finish:
149-
[Insert Image: "staging_server_confirmation.png"]
181+
4. Once the process is finished you should get the below confirmation screen where you can click Exit to finish:
182+
183+
> [!div class="mx-imgBorder"]
184+
> ![Screenshot shows Confirmation screen in the Staging Azure AD Connect dialog box.](media/how-to-connect-sync-staging-server/staging-server-confirmation.png)
150185
151186
5. You can again confirm that this is working by opening the Sync Service Console and checking if Export jobs are running:
152-
[Insert Image: "staging_server_sync_server_mgmr.png"]
187+
188+
> [!div class="mx-imgBorder"]
189+
> ![Screenshot shows Sync Service console on the Staging Azure AD Connect dialog box.](media/how-to-connect-sync-staging-server/staging-server-sync-server-mgmr.png)
153190
154191
## Disaster recovery
192+
155193
Part of the implementation design is to plan for what to do in case there is a disaster where you lose the sync server. There are different models to use and which one to use depends on several factors including:
156194

157195
* What is your tolerance for not being able make changes to objects in Azure AD during the downtime?
@@ -167,24 +205,29 @@ Depending on the answers to these questions and your organization’s policy, on
167205
If you do not use the built-in SQL Express database, then you should also review the [SQL High Availability](#sql-high-availability) section.
168206

169207
### Rebuild when needed
208+
170209
A viable strategy is to plan for a server rebuild when needed. Usually, installing the sync engine and do the initial import and sync can be completed within a few hours. If there isn’t a spare server available, it is possible to temporarily use a domain controller to host the sync engine.
171210

172211
The sync engine server does not store any state about the objects so the database can be rebuilt from the data in Active Directory and Azure AD. The **sourceAnchor** attribute is used to join the objects from on-premises and the cloud. If you rebuild the server with existing objects on-premises and the cloud, then the sync engine matches those objects together again on reinstallation. The things you need to document and save are the configuration changes made to the server, such as filtering and synchronization rules. These custom configurations must be reapplied before you start synchronizing.
173212

174213
### Have a spare standby server - staging mode
214+
175215
If you have a more complex environment, then having one or more standby servers is recommended. During installation, you can enable a server to be in **staging mode**.
176216

177217
For more information, see [staging mode](#staging-mode).
178218

179219
### Use virtual machines
220+
180221
A common and supported method is to run the sync engine in a virtual machine. In case the host has an issue, the image with the sync engine server can be migrated to another server.
181222

182223
### SQL High Availability
224+
183225
If you are not using the SQL Server Express that comes with Azure AD Connect, then high availability for SQL Server should also be considered. The high availability solutions supported include SQL clustering and AOA (Always On Availability Groups). Unsupported solutions include mirroring.
184226

185227
Support for SQL AOA was added to Azure AD Connect in version 1.1.524.0. You must enable SQL AOA before installing Azure AD Connect. During installation, Azure AD Connect detects whether the SQL instance provided is enabled for SQL AOA or not. If SQL AOA is enabled, Azure AD Connect further figures out if SQL AOA is configured to use synchronous replication or asynchronous replication. When setting up the Availability Group Listener, it is recommended that you set the RegisterAllProvidersIP property to 0. This is because Azure AD Connect currently uses SQL Native Client to connect to SQL and SQL Native Client does not support the use of MultiSubNetFailover property.
186228

187229
## Appendix CSAnalyzer
230+
188231
See the section [verify](#verify) on how to use this script.
189232

190233
```powershell
@@ -334,6 +377,7 @@ else
334377
```
335378

336379
## Next steps
380+
337381
**Overview topics**
338382

339383
* [Azure AD Connect sync: Understand and customize synchronization](how-to-connect-sync-whatis.md)

0 commit comments

Comments
 (0)