No module Published on Offcanvas position

A specified logon session does not exist, it may already have been terminated Microsoft 365

When trying to login any Microsoft 365 service in Windows are even through Settings > Accounts you get presented with this error.
As far as I've been able to tell, it seems to stem from past credentials still stored in on the machine.

Follow these steps to fix it:

  1. Open Registry Editor
  2. Navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common
  3. Delete the entire Identity folder
  4. Navigate to C:\Users\%username%\AppData\Local\Packages\Microsoft.AAD.BrokerPlugin_cw5n1h2txyewy\AC\TokenBroker\Accounts
  5. Delete all the files in the folder
  6. Restart all open Office applications and try to log in again