Hello, the solution that I found and that has always worked for me is the following:
-go to settings
-accounts
-get access to work or school
-select the user account and click on "disconnect"
-then restart the PC and log in again to the office application that has the error