MicrosoftTeams-msinternal icon indicating copy to clipboard operation
MicrosoftTeams-msinternal copied to clipboard

macOS: WHERE are the login accounts / UPNs cached?

Open luckman212 opened this issue 2 years ago • 5 comments

I spent a couple of hours trying to figure this out and eventually gave up.

When I launch Teams.app (currently using beta 1.6.00.10052 on macOS 13.3.1) I am greeted with a login/auth popup containing 7 accounts. I only currently use 2 of them. The others are related to test accounts that I used at some point in the distant past.

How can I clear this cache or remove these accounts from the chooser? I've traced every file that Teams seems to touch from launch leading up to that window appearing using eslogger. I also traced the HTTP traffic with Proxyman. I still can't figure out where in God's name this data is coming from.

Please help!

screenshot_a5kU8Gsv_gh

luckman212 avatar Mar 24 '23 12:03 luckman212

Nobody knows?

luckman212 avatar Apr 10 '23 14:04 luckman212

Since it was quiet in here (too quiet) I asked over on Ask Different and got an answer!

Apparently these are stored in the macOS Keychain. I came up with this one-liner that successfully cleared them out for me on the few systems I tested it on:

for svce in AdalCache OneAuthAccount; do security delete-generic-password -s $svce; done

Can't believe after so many hours (days) hunting this one down, it turned out to be such a simple answer. But, happy to have it solved.

luckman212 avatar Apr 10 '23 23:04 luckman212

That one liner is superb @luckman212 - I am going to make a script so we can automate clearing these on shared computers via MDM and other triggers...

bmike avatar Apr 11 '23 01:04 bmike

www.office-reset.com also has Reset scripts for Teams. They are built by a Microsoft engineer.

joeyfrijters avatar May 16 '23 08:05 joeyfrijters

Looks like it's back to the drawing board for the new Teams V2. The one-liner above no longer does the trick. Seems the cached credentials are hiding somewhere else now. Thanks for another wild goose chase Microsoft. Can you please document this somewhere??

luckman212 avatar Sep 12 '23 00:09 luckman212