Tip #856: Modifying disabled users

Disabled userToday’s tip comes to us from MVP Steve Mordue. (And you can submit your tips too by emailing them to jar@crmtipoftheday.com.)

Recently, we were working with one of our customers who was having some challenges with their daily manual import from their ERP to Dynamics 365. A fair number of records were throwing an import error indicating a duplicate CRM “user” existed. It turns out that some of their enabled users, also had identical disabled user records; I assume they had added, removed, then re-added the users at some point.
 
When you compare the enabled vs. the disabled records, the username (email address) was changed from like “mary@org.com” to “92fade2053df46beb2d8d1686b485497mary.org.com”; however the user’s full name was not changed. Their import source used the user’s full name.
 
Not wanting to create an extra step of adding the CRM username to the import file, our first thought was simply to remove the disabled users’ records. Dynamics 365 however, did not cooperate. Tier 1 support said we needed to do this from Office 365, which was not correct. We explored AAD with no luck. Tier 3 support, confirmed that it is not possible to remove disabled users records “by design.” I don’t know what that design requirement is, but we needed a solution.
 
Here is the workaround that we came up with:
 
The first step was to temporarily reverse the full-name format in Settings/Administration/General Tab from “First Name Last Name” to “Last Name First Name”
 
image005
 
You would probably want to do this at a time of day where new records are not being created.
 
The next step was to create an On-Demand Process on the user entity like below:

Image2 
 
In the Update User step, we selected an inconsequential field to update to force a refresh of the record, in our case we used Yomi First Name:
 
Image3
 
The next step was to open the disabled users list, select the offending ones, and run this workflow. The result was that the user full-name was reversed on these records.
 
The last step was to go back to Settings, and return the Full name format to the default.
 
We are now able to successfully import these records as the Full Name of the enabled user, is different from the Full Name of the disabled user record.

One thought on “Tip #856: Modifying disabled users

  1. Siva Kumar says:

    Awesome it’s worked.

Leave a Reply

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