Deleted user from the Active directory still exist in office 365

RawatP 61 Reputation points
2021-01-06T22:18:32.117+00:00

In our environment, we have one user account which doesn't found or already deleted in onPrem AD, but its o365 account still exist and user is visible in Azure AD.
So my question is do I need to perform any other step other than below steps:

  1. Delete user o365 account from portal
  2. Run command: "Remove-MsolUser –UserPrincipalName user@Company portal .com "

Thanks

Exchange | Exchange Server | Management
Windows for business | Windows Server | User experience | PowerShell
Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Accepted answer
  1. Andy David - MVP 157.8K Reputation points MVP Volunteer Moderator
    2021-01-06T22:41:21.903+00:00

    It should have been removed from Azure when it was deleted on-prem, but if not, then use the following steps
    If its still licensed, you can remove all the licenses before proceeding.

    Remove-MsolUser –UserPrincipalName ******@Contoso.com  
    Remove-MsolUser –UserPrincipalName ******@Contoso.com -RemoveFromRecycleBin  
    

    The last step will purge it permanently and it cant be recovered.

    https://learn.microsoft.com/en-us/powershell/module/msonline/remove-msoluser?view=azureadps-1.0#example-3--remove-a-user-from-the-recycle-bin

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. KyleXu-MSFT 26,396 Reputation points
    2021-01-07T01:43:40.06+00:00

    @RawatP

    You can run command below on the computer which installed AAD Connect:

    Start-ADSyncSyncCycle -PolicyType Delta  
    

    Then wait for local AD and AAD sync successfully, you could check from the Microsoft 365 admin center:
    54192-qa-kyle-09-42-41.png

    If AAD Connect has synced successfully, but this account still exist in AAD, you can take AndyDavid suggestion to delete this AAD account from Azure AD.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.