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 :
Small and medium business | Business Central, N...
Suggested answer

Deleting users after tenant migration

(8) ShareShare
ReportReport
Posted on by 24
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?
I have the same question (1)
  • Suggested answer
    Jainam M. Kothari Profile Picture
    12,148 Super User 2025 Season 2 on at
  • Gerardo Rentería García Profile Picture
    23,590 Most Valuable Professional on at
    Deleting users after tenant migration

    Hi, good day
    I hope this can help you, and give you some hints.

    Transfer an environment to another Microsoft Entra organization - Business Central | Microsoft Learn

    Best Regards
    Gerardo

  • HH-22101053-0 Profile Picture
    8 on at
    Deleting users after tenant migration
    Did you find any solution to this?
     
    I have an enviroment that I just moved between Entra tenants so all the users are doubled. 
     
    When I try to delete them in the enviroment it tries to point me to the Admin Center, but none of the users exist in the Admin Center.
     
    There has to be a way to clean up the enviroment or merge these users after Enviroment Transfer in Cloud. The previous answers are On-Prem dependent.
  • Suggested answer
    YUN ZHU Profile Picture
    93,317 Super User 2025 Season 2 on at
    Deleting users after tenant migration
    If there are no related records, you should be able to delete them directly in the Users page or AL code. If the record is associated, there is no way to delete it. . . .
     
     
    Thanks.
    ZHU
  • Suggested answer
    Richarrd Jansen Profile Picture
    24 on at
    Deleting users after tenant migration
    what Yun sais is correct. Once a user is associated there is no way to get rid of them. Asked Microsoft about this during the last BC Techdays in Antwerp, and they found it a nice suggestion to make this possible, but so far nothing can be done about it. We now renamed every old user with a _before is to have them all together without an integer behind the username. Works for now.
  • Suggested answer
    Rishabh Kanaskar Profile Picture
    5,087 on at
    Deleting users after tenant migration
    Hi,
     
    BC doesn’t auto-sync deletions from Microsoft 365 for non-existent users in the target tenant. Manual cleanup or scripted removal is required.
    Renaming old users seems a practical workaround to group them and avoid integer suffix conflicts.
     
    Have you tried using configuration packages to clean then up? Not sure if that would help.
     
    Thanks
    Rishabh
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    19,359 Super User 2025 Season 2 on at
    Deleting users after tenant migration
  • Suggested answer
    Pallavi Phade Profile Picture
    2,338 on at
    Deleting users after tenant migration
     
    Only solution which i can suggest looking at MS limitations and reading above experts advise .
     
    Disable the status as of now .
     
     
    Regards
    Pallavi Phade 

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 > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 2,762

#2
Sumit Singh Profile Picture

Sumit Singh 2,573

#3
YUN ZHU Profile Picture

YUN ZHU 1,930 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans