When adding a Microsoft account to a new user profile (like when configuring Teams or OneDrive) it is possible to get an error window like this
This is likely caused by a broken trust between computer and Azure AD: if you open an admin command prompt and run the command
dsregcmd /status
in the "Device Status" section the "AzureAdJoined" property should be YES but if it shows NO then the computer has a broken trust. Another symptom of this broken trust is that the computer is asking weekly for MFA to access email on outlook, sharepoint etc.
Also in Azure Portal in user's Sign-in logs if "device" is unknown it is another clue that the trust is broken
To fix the problem run in admin command prompt
DsRegCmd /debug /leave
and reboot computer, then run
DsRegCmd /join
and
DsRegCmd /status
now the "AzureAdJoined" property should be YES, Microsoft Accounts can be added without errors and computer will no longer asks for MFA