October 22, 2015

EXM install fails when Admin user is disabled

October 22, 2015

EXM Install Fails when Admin user is disabled

Wow, been heads-down with client work for a while and haven't had a chance to write to the 'ol blog.  Glad to have some breathing room before the next project starts to get a few posts out.

While installing EXM 3.0 rev. 150429 on a Sitecore 8.0 Update 3 instance for a client, we ran into an interesting issue.  What is normally a pretty simple install was failing for us.

We were seeing the following error:

ERROR Installation failed: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Sitecore.Exceptions.AccessDeniedException: Only administrators can create new domains
   at Sitecore.SecurityModel.DomainManager.AddDomain(String domainName, Boolean locallyManaged)
   at Sitecore.Modules.EmailCampaign.Core.InstallationPostAction.AddCommonDomain()
   at Sitecore.Modules.EmailCampaign.Core.InstallationPostAction.RunPostStep()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Sitecore.Install.Installer.ExecutePostStep(String action, IProcessingContext context)
   at Sitecore.Shell.Applications.Install.Dialogs.InstallPackage.InstallPackageForm.AsyncHelper.CatchExceptions(ThreadStart start)
The "Sitecore.Exceptions.AccessDeniedException: Only administrators can create new domains" line really caught my eye and after poking around for a bit I discovered the issue: Sitecore was expecting the "sitecore/admin" user and we had disabled this account.  Now this was done intentionally for security reasons and we created a separate account with "admin" privileges.  So it appears as though the install requires that the "sitecore/admin" context is used when installing EXM.  (Good thing we only disabled the user and didn't delete it!)

Steps to Reproduce

  1. Use SIM (you *are* using SIM, right?) to spool up a fresh instance of 8.0 update 3.
  2. Create new account and give it administrator privileges.
  3. Log out of "sitecore\admin" and log in as the new admin user.
  4. Disable 'old' admin account.
  5. Upload and install EXM package on the CM server.
  6. Note failure message.

Workaround/Fix

Pretty straight-forward here, but install EXM under the context of the "sitecore/admin" user.

I reported my error and findings/workaround to Sitecore Support and they were able to confirm that this is a bug that will be resolved in a future version of EXM.

0 comments:

Post a Comment