Microsoft 365 Authentication and TPM Trusted Platform Module Error Code 80090016

If you encounter this error, it is most likely due to Windows 10/11 being attached to a 365 account. Disconnect the account in Settings, Accounts, "Access Work or School", then try again.

You can automate/script the process by using SPJCleanUp.zip which is attached. Source