Employee Identifier Value Migration
Hire2Retire synchronizes user data from the HR system to Identity Providers. To perform this synchronization successfully, it requires a unique identifier that exists in both the HR system and the IDPs. This document provides guidance on populating the unique identifier values so that Hire2Retire can accurately and efficiently sync user information. Following the instructions in this guide ensures that employee records are consistent, complete, and up to date across all systems.
Pre-Requisites¶
- A CSV file that contains employee records from HR Management System whose employee identifier value will be populated.
 
On-Premise Active Directory¶
- On-Premises instance should have the necessary permissions to update employee attributes such as EmployeeID or EmployeeNumber.
 
Entra ID¶
A user or service account must have the following roles to perform the operation:
| Roles | Explanation | 
|---|---|
| User Administrator | This role grants permission to search and update employee attributes, such as EmployeeId in the Entra ID. | 
CSV File Requirements¶
To successfully populate employee identifiers, a CSV file containing employee records must be prepared. This file provides the input data for the update process.
Required Columns¶
| Cloumn Name | Description | 
|---|---|
| EmployeeIdentifierValue | Unique identifier of the employee from the HR system | 
| WorkEmail | Employee’s official work email address | 
| FirstName | Employee’s first name | 
| LastName | Employee’s last name | 
All columns are required. The migration process uses these details to locate and update employee records in the Identity Management accurately.
Executing the Migration Script¶
Ensure that the CSV file and the migration script are saved in the same folder before starting the migration process.
Entra ID¶
- Download the migration script from here.
 - Open PowerShell 5 or above and navigate to the folder where both the CSV file and the migration script are located.
 - Run the Migration Script by typing the provided command in PowerShell. This will start the process to update employee identifiers based on the CSV file.
 
./EntraIDEmployeeIdMigration.ps1 -FileName '<CSV File Name>.csv'
- As soon as the script is executed, a sign-in prompt will appear. Please ensure that you log in using an account that has the required roles and permissions as mentioned in the Prerequisites section.
 
On-Premises Active Directory¶
- Download the migration script from here.
 - Open PowerShell 5 or above and navigate to the folder where both the CSV file and the migration script are located.
 - Run the Migration Script by typing the provided command in PowerShell. This will start the process to update employee identifiers based on the CSV file.
 - When EmployeeID is the unique identifier, run the following command
 
./AdEmployeeIdMigration.ps1 -FileName '<CSV File Name>.csv' -EmployeeID $true
- When EmployeeNumber is the unique identifier, run the following command
 
./AdEmployeeIdMigration.ps1 -FileName '<CSV File Name>.csv' -EmployeeNumber $true
Viewing Results¶
After the migration script completes, two log files will be generated in the same folder:
- Success Log (UpdatedEmployeeStatus.csv)
- Contains all employee records that were successfully updated.
 
 - Failure Log (FailedEmployeeStatus.csv)
- Contains employee records that could not be updated, along with the reason for failure.