The migrations of user profiles may cause your 365 license to be invalidated for the first time you login after the migration. An error like this may occur: 


1. Go to the Windows search bar and type "Accounts" 


2. Click "Access work or school"


3. Click your account and click "Disconnect"

Note: make sure the disconnection is complete(The account will disappear)


4. Go to "Email & accounts"


5. Click "Add a work or school account"

6. Sign into your work account and your licenses should successfully re-apply to your account.


Note: you may be required to re-login when you open any Microsoft 365 desktop apps.