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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

References to deactivated user (deleted from AD) is impossible to replace with new user

(0) ShareShare
ReportReport
Posted on by

Hello,

CRM user has left the company and its Active Directory account had been deleted (security reasons). Using ADFS that information reached Office365 and from there that CRM Dynamics 365. CRM deactivated that user by itself. However many Accounts keep references to that user (it is in a custom lookup filed "Responsible person" on Account to System User). Later a new user was hired and it is time to change the loopkup fields from the old user to the new one, but CRM doesn't allow to change the lookups saying because the old user "is disabled". There is no way how to enable him in CRM , nor in Office365 (integrated with local AD via ADFS). In local AD the user was already deleted. How can that situation be solved? Why CRM doesn't allow to remove lookup references to disabled user and set them to a new user? It makes no sense to me...

Thanks for hint.

Best regards

Veroslav

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: References to deactivated user (deleted from AD) is impossible to replace with new user

    Hello,

    Try following approach that I used in past:

    1. Open your deactivated user in CRM.

    2. Click the button "Reassign Records" in command bar.

    3. In popup choose new owner, click ok, wait until records are reassigned to new owner.

    Good luck.

  • Community Member Profile Picture
    on at
    RE: References to deactivated user (deleted from AD) is impossible to replace with new user

    Hi Andrew,

    Thank you for quick reply. However "reassign records" works for changing Owner, but this in not the case. We have a custom fields "Responsible person for ..." on Accounts. Those are lookups to SystemUser entity. That is the problem - I can't change there a disabled user to a new (enabled) user.

    Any idea?

    Best regards

    Veroslav

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: References to deactivated user (deleted from AD) is impossible to replace with new user

    Ok. If this is not possible via UI I would recommend to look SQL approach - you can update field directly in SQL but before doing that - take a backup of your DB. I understand that it can be scary but sometimes it's the only way.

  • Community Member Profile Picture
    on at
    RE: References to deactivated user (deleted from AD) is impossible to replace with new user

    Not beeing scrared :-) Actually I did SQL updates in CRM many times in CRM 4.0 On Premise, but this is Dynamics 365 in cloud with no access to SQL database :-(

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: References to deactivated user (deleted from AD) is impossible to replace with new user

    Ah. So you're online. Can you please post screenshots and error logs that you get?

    And the last resort is Microsoft Support - they do have access to SQL :)

  • Community Member Profile Picture
    on at
    RE: References to deactivated user (deleted from AD) is impossible to replace with new user

    Here they go. The action was the change of "Resp. Active sales" from diasbled user (SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0) to new enabled user "Káplocky Denis".

    5658.Screen.jpg

    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: The user with SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0 in OrganizationContext=262aa090-1ad8-4b71-83eb-d1be65ba2181 is disabledDetail:
    <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
    <ActivityId>bb7d2995-8512-4f62-9ec8-c58390cf6be1</ActivityId>
    <ErrorCode>-2147220955</ErrorCode>
    <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">
    <KeyValuePairOfstringanyType>
    <d2p1:key>ApiExceptionSourceKey</d2p1:key>
    <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Plugin/Microsoft.Crm.Common.ObjectModel.AccountService</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
    <d2p1:key>ApiOriginalExceptionKey</d2p1:key>
    <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">Microsoft.Crm.CrmException: The user with SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0 in OrganizationContext=262aa090-1ad8-4b71-83eb-d1be65ba2181 is disabled ---&gt; Microsoft.Crm.CrmException: The user with SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0 in OrganizationContext=262aa090-1ad8-4b71-83eb-d1be65ba2181 is disabled
    at Microsoft.Crm.BusinessEntities.SecurityLibrary.CheckDisabledStatus(IUser user, IOrganizationContext context)
    at Microsoft.Crm.BusinessEntities.SecurityLibrary.AccessCheckInternal(ExecutionContext context, SecurityPrincipal principal, SecurityPrincipal ownerPrincipal, Guid objectId, Int32 objectTypeCode, Guid objectBusinessUnitId, AccessRights rights, Boolean retrievedAccessRights, AccessRights poaAccessRights)
    at Microsoft.Crm.BusinessEntities.SecurityLibrary.GetMaxAllowedAccessForPrincipal(SecurityPrincipal principal, SecurityPrincipal ownerPrincipal, Guid objectId, Int32 objectTypeCode, Guid objectBusinessUnitId, ExecutionContext context)
    at Microsoft.Crm.BusinessEntities.SecurityExtension.PreRetrievePrincipalAccessHandler(ExtensionEventArgs e, Object sender)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.PreRetrievePrincipalAccessEventHandler.Invoke(Object sender, ExtensionEventArgs e)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.RetrievePrincipalAccess(BusinessEntityMoniker moniker, SecurityPrincipal principal, ExecutionContext context)
    --- End of inner exception stack trace ---
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.Pipeline.&lt;&gt;c__DisplayClass2_1.&lt;Execute&gt;b__0()</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
    <d2p1:key>ApiStepKey</d2p1:key>
    <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">78ccbb1b-ea3e-db11-86a7-000a3a5473e8</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
    <d2p1:key>ApiDepthKey</d2p1:key>
    <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">2</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
    <d2p1:key>ApiActivityIdKey</d2p1:key>
    <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">7462cbfa-c4f1-4d3b-af50-cafffd308b5f</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
    <d2p1:key>ApiPluginSolutionNameKey</d2p1:key>
    <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
    </KeyValuePairOfstringanyType>
    <KeyValuePairOfstringanyType>
    <d2p1:key>ApiStepSolutionNameKey</d2p1:key>
    <d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">System</d2p1:value>
    </KeyValuePairOfstringanyType>
    </ErrorDetails>
    <Message>The user with SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0 in OrganizationContext=262aa090-1ad8-4b71-83eb-d1be65ba2181 is disabled</Message>
    <Timestamp>2018-11-19T11:24:18.7909487Z</Timestamp>
    <ExceptionRetriable>false</ExceptionRetriable>
    <ExceptionSource i:nil="true" />
    <InnerFault i:nil="true" />
    <OriginalException i:nil="true" />
    <TraceText>

    [LLP.CRM.Scania: LLP.CRM.Scania.AccountResponsibilities]
    [a504eaec-4cb3-e711-80ea-1458d043a400: LLP.CRM.Scania.AccountResponsibilities: Update of account]
    Starting sync workflow 'Responsibility person was changed - hidden fields', Id: 440e444c-5edd-e811-a971-000d3a2bcc69
    Entering ConditionStep1_step: llp_respactivesalesid
    Entering UpdateStep3_step:
    Entering ConditionBranchStep2_step:
    Entering ConditionStep4_step: llp_respbusid
    Entering ConditionStep7_step: llp_respnewvehiclesid
    Entering UpdateStep9_step:
    Entering ConditionBranchStep8_step:
    Entering ConditionStep10_step: llp_resprentalsid
    Entering UpdateStep12_step:
    Entering ConditionBranchStep11_step:
    Entering ConditionStep13_step: llp_respserviceid
    Entering ConditionStep16_step: llp_respssedvehiclesid
    Entering UpdateStep18_step:
    Entering ConditionBranchStep17_step:
    Entering ConditionStep19_step: llp_respscaniafinanceid
    Sync workflow 'Responsibility person was changed - hidden fields' completed successfully
    DEBUG:

    Debug Start plugin LLP.CRM.Scania.AccountResponsibilities Stage:20 Message:Update Entity:account Depth:1

    ERROR:

    Debug Start
    Debug ProcessResponsibilities foreach Update
    Debug ProcessResponsibilities foreach llp_respactivesalesid
    Debug ProcessResponsibilities foreach target llp_respactivesalesid c6b809c8-e69b-e811-a962-000d3a22c250
    Debug ProcessResponsibilities foreach llp_resprentalsid
    Debug ProcessResponsibilities foreach llp_respscaniafinanceid
    Debug ProcessResponsibilities foreach llp_respbusid
    Debug ProcessResponsibilities foreach llp_respserviceid
    Debug ProcessResponsibilities foreach llp_respnewvehiclesid
    Debug ProcessResponsibilities foreach llp_respssedvehiclesid
    Debug ProcessResponsibilities foreach end
    Debug Current List
    Debug Current List user:3bb0261c-1542-e811-a951-000d3a22cba0 count:1
    Debug Current List user:c6b809c8-e69b-e811-a962-000d3a22c250 count:1
    Debug Current List user:9d5ade4c-aa38-e811-a952-000d3a22c92b count:2
    Debug Current List user:0053cb58-ac38-e811-a950-000d3a23db8b count:1
    Debug GetAccessTeamMembers entityId:50abccad-b2f4-db11-a8cd-0019bb369d86 templateId:512231f8-76b2-e711-80e8-3863bb35ff88
    Debug AccessTeamList Count:0
    Debug Duration=229
    Error Exception: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: The user with SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0 in OrganizationContext=262aa090-1ad8-4b71-83eb-d1be65ba2181 is disabled (Fault Detail is equal to Exception details:
    ErrorCode: 0x80040225
    Message: The user with SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0 in OrganizationContext=262aa090-1ad8-4b71-83eb-d1be65ba2181 is disabled
    TimeStamp: 2018-11-19T11:24:18.7139812Z
    OriginalException: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: The user with SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0 in OrganizationContext=262aa090-1ad8-4b71-83eb-d1be65ba2181 is disabled (Fault Detail is equal to Exception details:
    ErrorCode: 0x80040225
    Message: The user with SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0 in OrganizationContext=262aa090-1ad8-4b71-83eb-d1be65ba2181 is disabled
    TimeStamp: 2018-11-19T11:24:18.7139812Z
    --
    Exception details:
    ErrorCode: 0x80040225
    Message: The user with SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0 in OrganizationContext=262aa090-1ad8-4b71-83eb-d1be65ba2181 is disabled
    TimeStamp: 2018-11-19T11:24:18.7139812Z
    --
    ).
    at Microsoft.Crm.Extensibility.OrganizationSdkSer...).
    Error Detail: The user with SystemUserId=3bb0261c-1542-e811-a951-000d3a22cba0 in OrganizationContext=262aa090-1ad8-4b71-83eb-d1be65ba2181 is disabled
    Error TraceText:


    </TraceText>
    </OrganizationServiceFault>

  • Verified answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: References to deactivated user (deleted from AD) is impossible to replace with new user

    So your issue is related to plugin that you have - LLP.CRM.Scania.AccountResponsibilities

    Fast way - deactivate step and do what you need.

    Long way - fix the code of plugin.

    I would highly recommend to use the long way.

  • Community Member Profile Picture
    on at
    RE: References to deactivated user (deleted from AD) is impossible to replace with new user

    Hi Andrew,

    That is the point! Franky speaking when I posted that issue online I did not expect much that it would be resolved, but you managed that. Thank you a lot! You are the best. As Japanese say: ichi ban.

    Veroslav

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: References to deactivated user (deleted from AD) is impossible to replace with new user

    You are welcome.

    You can close the thread marking my reply (or replies) as answer (or answers) it it was helpful.

  • Alexandrea Niell Profile Picture
    15 on at
    RE: References to deactivated user (deleted from AD) is impossible to replace with new user

    Hello! I am having this same issue and error message pop up. I have had out CIO look into this and he cannot seem to figure it out. What would be causing this? The users are all enabled in D365 and assigned to the appropriate roles. Whenever we try to update any account information we receive this error.

    This are the details of the error:

    0334.Error.JPG

    Exception Message: The user with SystemUserId=b71bd3f7-1325-e911-a94e-000d3a3b939c in OrganizationContext=f78ce716-7f71-47ea-ad61-72ca24504f3c is disabled

     

    ErrorCode: -2147220955

    HexErrorCode: 0x80040225

     

    ErrorDetails:

                    ApiExceptionSourceKey: Step/Microsoft.Crm.Extensibility.ImageRetrievalStep

                    ApiStepKey: 84b9d1ca-3e30-11db-b951-000cf1fe02ff

                    ApiDepthKey: 1

                    ApiActivityIdKey: bacee1e8-8fcb-42ee-aab2-3cd1a80283fc

                    ApiPluginSolutionNameKey: System

                    ApiStepSolutionNameKey: System

                    ApiExceptionCategory: ClientError

                    ApiExceptionMessageName: unManagedidsusernotenabled

                    ApiExceptionHttpStatusCode: 400

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans