When moving an enviroment to another tenant, the documentation tells us that the users will not be migrated. Basically this is true, the users from the source tenant do not exist in the target tenant, but that is not the end of the story. We found out that altough the users will not be migrated, the users in the user table will remain intact. I expected the user table would be empty, just like when migrating from on-prem to the cloud.
This causes problems when the user in the old domain has the same name as in the new domain. In that case the username already exists and every user is added with a 1 after the name, causing all sorts of different problems. Not an issue when having 50 users, but with 1250 users it's a little different.
Do you have suggestions how to remove the old users in the target environment other than scripting this in AL?
It seems that when a user has once connected to the source environment, you cannot delete them in the target environment. It gives the same error when trying to do this in de source environment, like "remove users in Microsoft 365 by revoking the BC license". Well, the user doesn't exist in the target environment, so it should remove them when syncing, but this doesn't happen.
Any ideas?