Remove users from Azure AD

Benutzer aus dem Azure AD löschen

Remove Users from Azure AD – bulk

Es kam eine Anfrage per E-Mail und die würde ich gerne kurz beantworten.

Als erstes muss man sich AzureADConnect herunterladen und installieren

AzureADConnect Info anzeigen

Integrating your on-premises directories with Azure AD makes your users more productive by providing a common identity for accessing both cloud and on-premises resources. With this integration users and organizations can take advantage of the following:Organizations can provide users with a common hybrid identity across on-premises or cloud-based services leveraging Windows Server Active Directory and then connecting to Azure Active Directory.

Administrators can provide conditional access based on application resource, device and user identity, network location and multifactor authentication.
Users can leverage their common identity through accounts in Azure AD to Office 365, Intune, SaaS apps and third-party applications.

Developers can build applications that leverage the common identity model, integrating applications into Active Directory on-premises or Azure for cloud-based applications
Azure AD Connect makes this integration easy and simplifies the management of your on-premises and cloud identity infrastructure.

Danach meldet man sich mit seiner TenantID (Verzeichnis-ID) an Azure an.

AzureADConnect Login

Abfragen welche User es gibt und exportiert diese in eine .csv. Liste überarbeiten und als Quelle übergeben.

Azure User List Object ID

Liste importieren und den Befehl zum Entfernen absetzen.

Remove bulk users from Azure

Powershell anzeigen

Connect-AzureAD -TenantID xxxxxxxxxxxx

Get-AzureADUser -All $true | Export-Csv C:\Temp\AllUsers.csv
Import-CSV C:\Temp\AllUsers.csv | Foreach-Object { Remove-AzureADUser -ObjectId $_.UserPrincipalName }