This week I had a customer who just migrated from local Exchange to office 365.
All users are synced to Office 365 by means of AADConnect, so the local AD is leading.
After the migration the customer wanted to create a new user, by means of copying an existing user. During the copy action the customer received this error:
“Windows cannot create the object “Username” because: The name reference is invalid.”
This error occurs due to the decommissioning of Exchange.
When you check this existing user in AD, and look for the attribute showInAddressBook, you see the value:
CN=Default Global Address List\0ADEL:5bad8f2d-b519-4d96-a2cb-e1b16dcfb958,CN=Deleted Objects,CN=Configuration,DC=DOMAIN,DC=LOCAL
Solution:
Option 1 : Manually
Change this value for this (and every user) manually
Option 2 : Without an Exchange installation
Change this value by means of powershell on the domain controller (Be sure to test is in a test environment first !)
get-aduser -Filter * -SearchBase "ou=users,ou=First-OU,dc=DOMAIN,dc=local" -properties showInAddressBook | Set-ADUser -Clear showInAddressBook
Option 3 : With Exchange installation
Change this value by means of Exchange powershell on the exchange server (Be sure to test is in a test environment first !)
Get-mailbox | Where {$_.AddressListMembership –like “*deleted*” | Update-Recipient