PSA: macOS clearing cached creds of Office 365 apps

This one wasted a bunch of my time today. Eugh!

I was trying to open some docs on Word but each time it would try and sign in with creds of a test tenant rather than the real one. Even though I’d click on the option to sign in with another account, and enter the correct creds, something was amiss and it wouldn’t work. Tried doing all sorts of things like adding the real tenant as a OneDrive connection, deleting a bunch of entries in the Keychain, and deleting a bunch of folders within sub-folders of ~/Library (the last two being the result of some Googling). Nothing helped. Even uninstalling re-installing didn’t (not that I was expecting it to).

I even signed out of the accounts in Word and other Office 365 apps but that didn’t help either.

Finally I stumbled upon:

And then:

And that did the trick!

Putting it here in case it helps someone else and saves them some time. Certainly wasted about 45 mins of my time today evening.