Today, I had the problem, that I wasn’t able to activate one of my crm users. Based on the error message, I wasn’t able to identify, where the problem might be.
1 2 3 |
External Error - No such object on server. The selected object could not be found. Verify that the object exists in both the database and Active Directory. If you contact support, please provide the technical details. |
But based on the error message, I started checking the ActiveDirectory-User. But the user exists and also the e-mail-address is correct. Next step was to check the ad-id of the user. This can be easily done with powershell. Use this command to get the id:
1 |
Get-ADUser -Filter "Name -like 'Mittermair*'" -Properties ObjectGUID |
The value in the field “ObjectGUID” is the id of the user in the active directory.
Next get the AD-ID of the CRM-User with the following SQL-Script:
1 |
select ActiveDirectoryGuid from SystemUserbase where LastName = 'Mittermair' |
Comparing these IDs showed a difference. Reason was, that the user in the AD was deleted and created again. In CRM, the user can’t be deleted and after deactivating the user in CRM, the system checks the ID on activation.
I updated the ID in CRM with the following command:
1 2 3 |
update SystemUserbase set ActiveDirectoryGuid ='38adf6ed-3b95-49a9-bd16-4de798ecf31d' where systemuserid ='a91d84eb-d02f-eb11-9143-005056a26140' |
Afterwards, I was able to activate the user in CRM as usual.