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 Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,348 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,363 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,465 questions
0 comments No comments
{count} votes

Accepted answer
  1. Andy David - MVP 141.6K Reputation points MVP
    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 user@Contoso.com  
    Remove-MsolUser –UserPrincipalName user@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

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. KyleXu-MSFT 26,206 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