Remove Unlicensed Users in Office 365: A Step-by-Step Guide
Are you a system administrator or IT manager facing the challenge of unlicensed users in your Office 365 environment? Unlicensed users can occur when licenses are not correctly managed, leading to potential issues such as lack of access control, wasted resources, and unauthorized data access. In this guide, we'll walk you through the process of identifying and removing unlicensed users in Office 365, ensuring a secure and well-managed environment.
Before diving into the removal process, it's crucial to understand the implications of unlicensed users. Unlicensed users may not have access to the full suite of features, could be consuming resources without proper authorization, and might pose security risks. Regularly auditing and managing licenses is essential for maintaining a secure and efficient Office 365 infrastructure.
Identifying Unlicensed Users
The first step in removing unlicensed users is to identify them. Microsoft provides several ways to do this, including PowerShell and the Office 365 admin center.
Using PowerShell is often the most efficient method, as it allows for automated scripts and exports. To get started, you'll first need to install the AzureAD and Exchange Online PowerShell modules. After setting up a connection to Office 365, you can use the following cmdlets to identify unlicensed users:
Using PowerShell to Identify Unlicensed Users
Get-AzureADUser -Filter "UserType eq 'Member'" | Select-Object DisplayName, UserPrincipalName, AccountEnabled, LicenseAssignmentStatus
This command will return a list of all active users along with their license assignment status. You can then filter the results to find unlicensed users by adding the following code:
$unlicensedUsers = Get-AzureADUser -Filter "UserType eq 'Member' and (LicenseAssignmentStatus eq 'None' or LicenseAssignmentStatus eq 'ExplicitlyDenied')" | Select-Object DisplayName, UserPrincipalName, AccountEnabled, LicenseAssignmentStatus
Identifying Unlicensed Users in the Office 365 Admin Center
If you prefer a graphical interface, you can use the Office 365 admin center to identify unlicensed users. Navigate to the "Show all" option in the left-hand menu, then click on "Users & groups"
Here, you can filter the users by license assignment status. Click on the "License status" filter, and select "No licenses assigned" to view a list of unlicensed users.
Removing Unlicensed Users
Once you have identified the unlicensed users, it's time to remove them from your Office 365 environment. Before proceeding, ensure that you have reviewed the impact of removal on the user's data and access rights.
When removing unlicensed users, you have two main options: suspending their accounts or deleting them permanently.
Suspending Unlicensed User Accounts
Suspending a user account is a reversible action that can be useful when you're not sure about the user's status or need to review their access rights further. To suspend a user account:
- Select the user in the Office 365 admin center "Users & groups" page.
- Click on "Block user" in the right-hand menu.
- Choose "Suspend user" and click "Suspend."
Permanently Deleting Unlicensed User Accounts
If you're certain that the unlicensed users no longer require access to your Office 365 environment, you can delete their accounts permanently. This action cannot be undone, so ensure you have the proper authorization before proceeding:
- Select the user in the Office 365 admin center "Users & groups" page.
- Click on "Delete user" in the right-hand menu.
- Confirm the deletion, and click "Delete."
After deleting the user, you'll have 30 days to restore the account if needed. During this period, you can also recover any data belonging to the deleted user. After 30 days, the account and its data will be permanently deleted from your Office 365 environment.
Regularly auditing and managing licenses in your Office 365 environment can help prevent the accumulation of unlicensed users and ensure optimal use of resources. By staying proactive in managing licenses, you can maintain a secure and efficient environment for your organization. Stay vigilant and keep monitoring your Office 365 setup to keep unlicensed users at bay.