We use the sync client to import accounts from our AD. When they are imported, we automatically assign them licenses based on the group they are in. We found a couple that should not have been imported. We couldn't remove the licenses directly because they were applied based on group membership. We couldn't remove them from the group directly because of the sync. We "de-synced" them and they ended up in the Deleted Users area, but it looked like they still had licenses assigned (and ran the powershell command to verify). We deleted them from the Deleted Users to see if the licenses would be reclaimed. They have not. So, did we just lose licenses? Or does it take a while on the backend for Microsoft to let us use them again? It's been about 6 hours so far since all this went down.
Thanks in advance for any direction or help with head-scratching.
4. Save the script after you updated it with the file name. Make sure you end the file name with .ps1
5. Run the script in PowerShell.
The script reactivates the account, removes any license assigned to the account and then removes the account. You can run the command Get-MsolUser –ReturnDeletedUsers again afterwards to ensure all accounts now show False under IsLicensed.