> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.trugrid.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Changing a Customer’s Domain in TruGrid

When a customer’s domain changes, the steps depend on how the TruGrid domain is connected: Entra ID, On-Premise AD, or Hybrid. TruGrid identifies users by their UPN, so any user whose UPN changes appears in TruGrid as a new user. Their resource assignments have to be redone.

| For large environments, contact TruGrid Support before you begin. A coordinated migration with our Support and Development teams can carry over settings and help move agents.

### Before you start&#xA;

* Export or write down the current user assignments, license allocation, and any domain-level settings, such as Trusted Locations and Entra ID Login Management. None of these carry over to a new customer domain.
* A new customer domain has its own activation code. Any Sentry or Secure Connect installed against the old domain has to be reinstalled with the new code.

### Entra ID&#xA;

1. Add a new customer domain using the new DNS domain and validate it. TruGrid Support can validate it for you.
2. Disconnect the existing customer domain under **Customer domains / Domains**.
3. Make sure your Global Admin account uses the new domain as its UPN.
4. Connect the new domain to the customer domain you created in step 1.
5. Confirm the users appear, then redo their assignments.
6. Reinstall Secure Connect on each host using the new domain’s activation code.
7. Remove the old customer domain from **Customer domains**.

###### On-Premise AD: Option 1, keep the existing TruGrid domain&#xA;

Recommended when only the users’ UPN suffix is changing. No new activation code is needed, and Sentry stays as it is.
1. Add the new domain as an alternative UPN suffix in AD:

powershell
```
   Get-ADForest | Set-ADForest -UPNSuffixes @{Add='newdomain.com'}
```
2. Contact TruGrid Support to add the new domain as a UPN alias on your existing TruGrid domain.
3. Change the UPN of the users in TG-USERS. Run it with `-WhatIf` added to `Set-ADUser` first to preview the changes.

powershell
```
   $old = 'olddomain.com'; $new = 'newdomain.com'
   Get-ADGroupMember TG-USERS -Recursive | Where-Object objectClass -eq 'user' | Get-ADUser |
     Where-Object { $_.UserPrincipalName -like "*@$old" } |
     ForEach-Object { Set-ADUser $_ -UserPrincipalName ($_.UserPrincipalName -replace "@$([regex]::Escape($old))$", "@$new") }
```
4. Restart the TruGrid Sentry service, or run an AD refresh from the Assignments page.
5. Confirm the users appear with the new UPN in `C:\Program Files\TruGrid\Sentry\agent.log` and in the portal.
6. Redo the users’ assignments.

###### On-Premise AD: Option 2, new TruGrid domain

Use this when the new domain should become the TruGrid domain itself.
1. Add a new customer domain using the new DNS domain and validate it.
2. Add the UPN suffix and update the users’ UPNs as in Option 1, steps 1 and 3.
3. Uninstall TruGrid Sentry from all servers.
4. Install Sentry using the new domain’s activation code.
5. Confirm the users appear, then redo their assignments and license allocation.
6. Remove the old customer domain.

###### Hybrid&#xA;

|| UPN aliases are not supported on Entra-connected domains (for EntraID logins), so a Hybrid domain change always requires a new TruGrid domain.


1. Verify the new domain in Entra ID.
2. Add a new customer domain in TruGrid using the new DNS domain and validate it.
3. Add the new UPN suffix in AD and update the users’ UPNs, as in AD Option 1, steps 1 and 3.
4. Let Entra Connect sync, then confirm the new UPNs show in Entra ID.
5. Disconnect the existing customer domain under **Customer domains / Domains**.
6. Uninstall TruGrid Sentry from all servers.
7. Make sure your Global Admin account uses the new domain as its UPN, then connect the new customer domain to Entra ID.
8. Install Sentry using the new domain’s activation code.
9. Reinstall Secure Connect on any hosts that use it.
10. Confirm the users appear, then redo their assignments and license allocation. If you used Trusted Locations, contact TruGrid Support to set them up again. Re-enable Entra ID Login Management if you used it.
11. Remove the old customer domain.