You may have noticed that while deprovisioning a user, the following error may be displayed the user’s change history upon completing the deprovision:
The policy 'Options to retain office365' licenses failed either user is not Azure user or ran into errors when assigning licenses.
This is a product defect (269808), incorrect error logged in Change History.
None available, that when the policy is not included, the licenses are removed. And when the policy is included, the licenses are retained, but te incorrect error is logged in the user’s Change History.
This will be fixed on a future release of the product. Please refer to this article for updates or contact support referencing the defect ID 269808.