How to Revoke License from User in Office 365/Azure AD

An Office 365 license is a subscription plan that allows users to access Microsoft office applications (Word, Excel, Outlook, Teams, etc.) and other productivity services provided by Microsoft’s cloud-based platform office 365.

There are different types of Office 365 licenses available, each with its own set of features and pricing. Each license fee is based on a monthly or yearly subscription. Cloud-based applications provide a lot of features and security but at the same time, it can be very costly if license management is handled carefully. An example is that users who have been disabled in Office 365 / Azure Active directory still have licenses assigned and you are paying for those licenses according to your subscription.

Find Disabled Users with Licenses

The following script will generate a list /count of users who are in a disabled state but have any type of license. You will get a prompt to allow the permissions to read all Users and organizations.

Connect-Graph -Scopes User.Read.All, Organization.Read.All
Get-MgUser -Filter ‘accountEnabled eq false and assignedLicenses/$count ne 0’ -ConsistencyLevel eventual -CountVariable licensedUserCount -All -Select UserPrincipalName,DisplayName,AssignedLicenses | Format-Table -Property UserPrincipalName,DisplayName,AssignedLicenses

Write-Host “Found $licensedUserCount licensed and disabled users.”

Licensed disabled users

Revoke a License from Office 365 User.

Open Office 365 admin portal https://admin.microsoft.com
Select Active Users from the left menu.
Click on User to remove the license.
Click on the “Licenses and apps” tab
Uncheck the license which you want to revoke and click save.

Revoke Office 365 License

 

Remove a License from Azure Active Directory Portal

Open Azure Ad portal http://portal.azure.com
Open Azure Active Directory
Select Users from the left menu

Users in Azure AD
Select User to revoke the license.

Remove License Azure Ad
Click on Licenses from the left menu and select License

Unassign Azure AD License

Azure AD License remove-6

Click on Remove license.

Remove License

 

Unassign a License for Multiple Users

Open Azure Ad portal http://portal.azure.com
Open Azure Active Directory
Click on Licenses from the left menu

Azure AD Licenses
Click on All products

Licenses All Products
Click on License

Select Licenses
Select multiple users and click Remove license to revoke licenses.

Remove license multiple users

Note: If you will remove the license from an active/disabled user, User’s data will be removed after 30 days. If you want to keep the data, then it’s better to back up or leave the license assigned.

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More