web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dynamics 365 Organization Update (CRM Update 2) Fails on one of the Organizations

(0) ShareShare
ReportReport
Posted on by

Can anyone help with this Error when trying to update one of the Organizations in CRM 2016 Update 2.

11:46:17|  Error| Installer Complete: OrganizationDatabaseHotFixer - Error encountered
11:46:17|  Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationDatabaseHotFixer: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction
InnerException:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmException: The user Id(s) [d0d014df-a280-423c-b7cf-6d00eab8f160] is invalid.
   at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetPrivilegedUserCallerAndBusinessGuidsFromThread(WindowsIdentity identity, IOrganizationContext context)
   at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId, LocatorServiceContext locatorServiceContext)
   at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.GetCurrentUserId(Guid organizationId)
   at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.PopulateBaseOrganizationLanguagePack(Guid organizationId)
   at Microsoft.Crm.SE.DllMethodActions.UpdateBaseLanguagePackVersion.Execute()
   --- 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.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId, Nullable`1 operationType)
   at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
   at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
   at Microsoft.Crm.Setup.Database.DatabaseInstaller.InstallUpdate(String configurationFilePath, Boolean upgradeDatabase)
   at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId, Nullable`1 operationType)
   at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdatesInternal(Guid orgId, String orgUniqueName, String releaseFilePath, Boolean ignoreErrors, OrganizationOperationType operationType)
   at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdates(Guid orgId, String orgUniqueName, OrganizationOperationType operationType)
   at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.Do(IDictionary parameters)
   at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
InnerException:
Microsoft.Crm.CrmException: The user Id(s) [d0d014df-a280-423c-b7cf-6d00eab8f160] is invalid.
   at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetPrivilegedUserCallerAndBusinessGuidsFromThread(WindowsIdentity identity, IOrganizationContext context)
   at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId, LocatorServiceContext locatorServiceContext)
   at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.GetCurrentUserId(Guid organizationId)
   at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.PopulateBaseOrganizationLanguagePack(Guid organizationId)
   at Microsoft.Crm.SE.DllMethodActions.UpdateBaseLanguagePackVersion.Execute()

11:46:17|   Info| Setting organization state.  New state = Failed
11:46:17|  Error| Update Organization with Id=bdcf8905-1129-45bf-9c61-430dfb3c6c58 failed with Exception:
System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Crm.CrmException: The user Id(s) [d0d014df-a280-423c-b7cf-6d00eab8f160] is invalid.
   at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetPrivilegedUserCallerAndBusinessGuidsFromThread(WindowsIdentity identity, IOrganizationContext context)
   at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread(WindowsIdentity identity, Guid organizationId, LocatorServiceContext locatorServiceContext)
   at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.GetCurrentUserId(Guid organizationId)
   at Microsoft.Crm.Setup.Server.Utility.NewOrgUtility.PopulateBaseOrganizationLanguagePack(Guid organizationId)
   at Microsoft.Crm.SE.DllMethodActions.UpdateBaseLanguagePackVersion.Execute()
   --- 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.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId, Nullable`1 operationType)
   at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
   at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
   at Microsoft.Crm.Setup.Database.DatabaseInstaller.InstallUpdate(String configurationFilePath, Boolean upgradeDatabase)
   at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId, Nullable`1 operationType)
   at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdatesInternal(Guid orgId, String orgUniqueName, String releaseFilePath, Boolean ignoreErrors, OrganizationOperationType operationType)
   at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdates(Guid orgId, String orgUniqueName, OrganizationOperationType operationType)
   at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.Do(IDictionary parameters)
   at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
   --- End of inner exception stack trace ---
   at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
   at Microsoft.Crm.Setup.Shared.Installer.Install(IDictionary stateSaver)
   at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
   at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
   at Microsoft.Crm.Tools.Admin.OrganizationDatabaseHotFixer.Execute()
   at Microsoft.Crm.Tools.Admin.ApplyDatabaseHotFixInstaller.ApplyDatabaseHotFix(IApplyDatabaseHotFixInfo applyDatabaseHotFixInfo)
11:46:17|   Info| Found the older table DBUpdateInstallInfo_V5, updating new table and deleting
11:46:17|   Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 8.2.0000.0749.

*This post is locked for comments

I have the same question (0)
  • Wayne Walton Profile Picture
    13,730 on at

    It sounds like somehow a user got deleted.  What you need to do is look for that GUID in the users table, and also track against basically all tables for CreatetBy, ModifiedBy, and OwnerID.  If you find that user in those tables, try to bulk reassign the records, or manually do it if there's only a few.

    If that doesn't work, you might have to take the riskier position of directly editing the database to change the GUID of the user to one that exists.  Make sure to take backups first.

  • Community Member Profile Picture
    on at

    Thanks for the help Wayne,

    The GUID corresponds to the SYSTEM user in the SystemUserBase table.  The record appears to be intact.   I don't believe the user got deleted.

    This Organization that failed the update is a test Organization.  The production organization was upgraded successfully.   Have you seen this type of error before?  Did you mean the user was inadvertently deleted from the database?

  • Wayne Walton Profile Picture
    13,730 on at

    Hmm, I've seen stuff similar to that, but not where the SYSTEM user is throwing the error.  My suggestion would be to dump the Test environment and make a copy of your updated production environment for a new Test to avoid problems.

  • Community Member Profile Picture
    on at

    Thanks for your suggestion, Wayne! Will do.

  • Verified answer
    Community Member Profile Picture
    on at

    Thanks Wayne...  I will talk to the data owner about creating a new test org.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans