[TUTO] – Azure AD : How to remove a user in Azure Active Directory

0 Flares Filament.io 0 Flares ×

We will see in this tutorial how to remove a user from your domain Azure Active Dirctory in Powershell.

Before anything, you will need the module MSOL and its Powershell commands to be able to connect to the Azure Active Directory domain and act on items in this area. I will probably return to the installation of the module in a next tutorial, in the meantime feel, free to follow the documentation from Microsoft here https://docs.microsoft.com/en-us/powershell/azure/active-directory/install-msonlinev1?view=azureadps-2.0.

 

Start a Powershell console and then enter the following command to connect:

A connection prompt appears and simply use a local account “onmicrosoft.com”, or a verified domain account to connect. Of course, the account must have the necessary rights to connect.

 

Once connected, to remove a user, enter the following command using its “User Principal Name”.

 

If by chance you are wrong on the command and delete a bad user, don’t worry, the command you just learn does not permanently remove user but put it in the Recycle Bin Azure AD for 30 days before being completely removed.

We will see together in a next tutorial, how to recover a deleted user or how to permanently delete a user without waiting for the deadline of 30 days.

Posted in Azure (EN) and tagged , , , .
Jérémy Lebon
Co-Fondateur de sys-Advisor.com, Ingénieur de production Informatique dans l'e-commerce mais passionné avant tout, je partage mon quotidien à travers ce site. #sysadmin #microsoft #vmware #tech #geek @sysadvisorContact Skype Enterprise : jeremy.lebon@sys-advisor.com



-->

Un commentaire

  1. Pingback: [TUTO] - Azure AD: how to purge the trash Azure Active Directory - Sys-advisor

Leave a Reply

You have to agree to the comment policy.