D365 F&O environments should ideally always be deployed using an unnamed account (e.g. ). This ensures that if users leave the business for any reason, there are no security implications, or worse still, the business is not stuck unable to maintain or update any environments.

However, for various reasons, it may not be possible to get the environment administrator right in the first instance, and it needs to be changed later on. If this has happened to you, you’re in the right place!

This post describes how to change the environment administrator, depending on whether you’re trying to fix a Tier 2+ or a Tier 1…

Tier 2+

Changing the environment administrator on a Tier 2 (or higher) environment is relatively straightforward.

First navigate to LCS, where you will need to be a nominated user of the relevant project. Select the project, and view the full details for the environment in question.

From there, chose to Maintain > Update Environment Administrator. The screenshots below show all requisite steps to achieve this.

N.B. Bear in mind that this change will cause downtime to the environment!

Tier 1

Changing the environment administrator on a Tier 1 environment is not as straightforward, requiring a little more comfort with development environments! The following steps detail how to go about this:

Start by using RDP or Bastion to connect to the Tier 1 environment. Then, run Windows Powershell ISE and execute the following commands in order.

N.B.  If you just use the command line version of Powershell it tends to look like it’s hanging even when it’s run successfully.

PS C:\windows\system32> Install-Module -Name D365 F&O.tools
NuGet provider is required to continue

PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories.  The NuGet provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or 'C:\Users\Admin##########\AppData\Local\PackageManagement\ProviderAssemblies'.  You can also install the NuGet provider by running 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'.  Do you want PowerShellGet to install and import the NuGet provider now?

[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y
Untrusted repository

You are installing the modules from an untrusted repository.  If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet.  Are you sure you want to install the modules from 'PSGallery'?

[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): A
PS C:\windows\system32> Import-Module -Name D365 F&O.tools
PS C:\windows\system32> Set-D365Admin -AdminSignInName “"

Leave a comment

Your email address will not be published. Required fields are marked *