There are times when you might face issue with changing license assignments for an office 365 user using the Admin Portal. You can use use instructions in this post and use PowerShell to fix this.
1. Open Azure Active Directory Module for Windows PowerShell and connect to Office 365 using below commands. Enter the credentials of global admin when prompted.
$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential
2. Run the following command to get a list of licenses assigned to the user.
Get-MsolUser –UserPrincipalName “email@example.com”| FL display*,licenses
3. Run the following command to remove the license you want to remove. You can then run the command in step 2 to verify if license is removed or you can also verify using admin portal.
Set-MsolUserLicense -UserPrincipalName firstname.lastname@example.org -RemoveLicenses “Orgname:license”