locked
I deleted all Azure tenan Active Directory users in my subscription RRS feed

  • Question

  • I deleted all Azure tenan Active Directory users in my subscription

    Need help. Performing a cleanup on my Azure Active Directory, I deleted via powershell all users of my AD Tenant. I can no longer see my azure active directory.

    When I click on home> active directory, the console takes as follows:

    

    Help!rsrs


    Gustavo Vilardi 


    Friday, March 27, 2020 1:41 AM

Answers

  • I managed to solve my problem, following resolution:

    Since I had deleted all the AzureAD users via powershell, the user I was logging into in the Azure portal had no permissions on my tenant, which is why I can't see it. To resolve, I did the following steps:

    With powershell I logged into my AzureTennantAD:

    Connect-MsolService

    I obtained a list of users deleted through powershell:

    Get-MsolUser -ReturnDeletedUsers

    I restored the user through powershell:

    Restore-MsolUser -UserPrincipalName

    Thanks,


    Gustavo Vilardi MCDST/MCSA/MCTS MCITP/CCNA

    Tuesday, April 7, 2020 8:16 PM

All replies

  • Hi Gustavo,

    if you deleted your Azure AD tenant, then this is expected

    hth
    Marcin

    Friday, March 27, 2020 3:07 AM
  • is it possible to recover?

    Gustavo Vilardi MCDST/MCSA/MCTS MCITP/CCNA

    Friday, March 27, 2020 12:24 PM
  • Or delete mu subscription, my account, delete everything and recreate?

    Gustavo Vilardi MCDST/MCSA/MCTS MCITP/CCNA

    Friday, March 27, 2020 12:25 PM
  • If you've accidentally deleted users, you can restore them within 30 days. For instructions refer to this link - https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-users-restore?context=azure/active-directory/users-groups-roles/context/ugr-context&view=azurermps-3.8.0 

    ------------------------------------------------------------------------------------------------------------------------
    If this answer was helpful, click “Mark as Answer” and Up-Vote. Feel free to reach out to us if you've any further questions in this matter.

    Friday, April 3, 2020 2:47 PM
  • I managed to solve my problem, following resolution:

    Since I had deleted all the AzureAD users via powershell, the user I was logging into in the Azure portal had no permissions on my tenant, which is why I can't see it. To resolve, I did the following steps:

    With powershell I logged into my AzureTennantAD:

    Connect-MsolService

    I obtained a list of users deleted through powershell:

    Get-MsolUser -ReturnDeletedUsers

    I restored the user through powershell:

    Restore-MsolUser -UserPrincipalName

    Thanks,


    Gustavo Vilardi MCDST/MCSA/MCTS MCITP/CCNA

    Tuesday, April 7, 2020 8:16 PM
  • Glad to hear it is resolved :)
    Wednesday, April 8, 2020 4:14 AM