DYNAMICS 365 CUMULATIVE UPDATE INSTALLATION FAILED WITH ERROR

Usually, installing a cumulative update for Dynamics 365 on premises is easy and does not require deep expertise in order to achieve it.

However, you might face errors as happened the last day with one of my colleagues.

PROBLEM

He informed me that he is not able to install the cumulative update (9.0.23.7) of D365 on premises on one organization. While, he was able to do it on another and both organizations are on the same development server.

Therefore, I got the error log and the trace is the following (kept only the interesting part):

System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction ---> Microsoft.Crm.CrmException: Error in Action: Microsoft.Crm.SE.DatabaseActions.dll: Execute on attempt 3.
System.Reflection.TargetInvocationException : An exception was thrown by the target of a call. ---> Microsoft.Crm.CrmException: The user Id (s) [00000000-0000-0000-0000-000000000000] is invalid.
at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetPrivilegedUserCallerAndBusinessGuidsFromThread (WindowsIdentity identity, IOrganizationContext context, Guid systemUserId)
at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread (WindowsIdentity identity, Guid organizationId, LocatorServiceContext locatorServiceContext, Guid systemUserId)
at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetCallerAndBusinessGuidsFromThread (WindowsIdentity identity, Guid organizationId)
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 ()


REASON

The highlighted above error is not clear enough to troubleshoot and know how to resolve the issue.

However, I continue reading the trace, and I noticed the following function name that is being called GetPrivilegedUserCallerAndBusinessGuidsFromThread when the problem has occurred.

In this step, the installation procedure is trying to get the user privileges who is running the installation and it is failing.

I opened the organization and went to the list of enabled users and found out that the user does not exist in the organization, but, it exists on the other organization where the update is successfully applied.

SOLUTION

Once I added the missing user to the organization, my colleague was able to apply the update on the organization.


Bonus Tip: Always look inside the trace for more details because it can lead you to the action the system is trying to do and can give you many hints on the error


Hope This Helps!

Comments

Popular posts from this blog

DYNAMICS 365 HOW TO HIDE RECENT RECORDS FOR LOOKUP FIELD IN UCI

SEARCH BY GUID IN DYNAMICS 365

SAVE FORM IN DYNAMICS 365 JAVASCRIPT