MS Teams logout issue

%3CLINGO-SUB%20id%3D%22lingo-sub-1664651%22%20slang%3D%22en-US%22%3EMS%20Teams%20logout%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1664651%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20figure%20out%20an%20issue%20with%20MS%20Teams%2C%20and%20not%20having%20much%20luck%2C%20so%20I'm%20wondering%20if%20anyone%20else%20has%20encountered%20this%20before.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20have%20a%20shared%20PC%20in%20a%20conference%20room%20that%20people%20will%20use%20to%20log%20into%20a%20shared%20user%20account%2C%20and%20then%20into%20their%20personal%20Teams%20account%20during%20their%20meeting.%20The%20problem%20is%20that%20some%20users'%20accounts%20seem%20to%20be%20cached%20on%20the%20PC%2C%20and%20all%20you%20need%20to%20do%20to%20log%20into%20their%20account%20is%20enter%20their%20email%2C%20no%20password%20required.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20the%20following%2C%20with%20no%20luck%20so%20far%3A%3C%2FP%3E%3CUL%3E%3CLI%3ECompletely%20cleared%20out%20credential%20manager%3C%2FLI%3E%3CLI%3EDeleted%20the%20contents%20of%20%25AppData%25%5CMicrosoft%5CTeams%3C%2FLI%3E%3CLI%3EDeleted%20the%20contents%20of%20HKLM%5CSoftware%5CMicrosoft%5COffice%5CTeams%3C%2FLI%3E%3CLI%3EUninstall%2Freinstall%20with%20Revo%20Uninstaller%20to%20also%20remove%20leftover%20registry%2Ffolder%20items%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20finally%20reimaged%20the%20computer%20I%20was%20testing%20on%2C%20which%20of%20course%20fixed%20the%20issue%2C%20but%20there%20has%20to%20be%20a%20less%20invasive%20solution%20that%20I%20just%20haven't%20found%20yet.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1664651%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Ecached%20login%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Elogout%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1667730%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Teams%20logout%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1667730%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F793024%22%20target%3D%22_blank%22%3E%40awarwick%3C%2FA%3E%26nbsp%3BHello%2C%20you%20can%20prevent%20the%20pre-population%20of%20the%20UPN%20with%20a%20registry%20key.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EComputer%5CHKEY_CURRENT_USER%5CSoftware%5CMicrosoft%5COffice%5CTeams%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ESkipUpnPrefill(REG_DWORD)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E0x00000001%20(1)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fsign-in-teams%23windows-users%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmicrosoftteams%2Fsign-in-teams%23windows-users%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1691787%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Teams%20logout%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1691787%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F551905%22%20target%3D%22_blank%22%3E%40bec064%3C%2FA%3E%26nbsp%3BThis%20does%20not%20actually%20solve%20the%20problem%20I%20mentioned%2C%20it%20only%20prevents%20Teams%20from%20auto-populating%20the%20username.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThrough%20a%20little%20bit%20more%20testing%2C%20I've%20narrowed%20it%20down%20a%20little%20farther.%26nbsp%3B%20It%20as%20long%20as%20I%20click%20on%20%22No%2C%20sign%20in%20to%20this%20app%20only%22%20on%20the%20attached%20image%2C%20my%20login%20is%20not%20remembered%20and%20I%20need%20to%20enter%20a%20password%20every%20time%20I%20log%20in.%26nbsp%3B%20However%2C%20as%20soon%20as%20I%20click%20OK%20in%20this%20window%2C%20whether%20the%20%22Allow%20my%20organization%20to%20manage%20my%20device%22%20checkbox%20is%20checked%20or%20not%2C%20my%20password%20is%20saved%20on%20this%20Teams%20login%20going%20forward%2C%20and%20there's%20no%20way%20to%20reverse%20it%20short%20of%20fully%20reimaging%20the%20computer%20(at%20least%20that%20I%20have%20found%20so%20far).%26nbsp%3B%20And%20until%20I%20reimage%20the%20PC%2C%20anyone%20can%20log%20into%20my%20Teams%20account%20using%20only%20my%20email%20address%2C%20no%20password%20required.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20note%20that%20this%20is%20related%20to%20our%20conference%20room%20PCs%2C%20which%20use%20a%20shared%20Windows%20login%2C%20so%20I'm%20guessing%20you%20might%20not%20have%20this%20issue%20without%20shared%20logins%2C%20I%20just%20haven't%20tested%20that%20yet%20since%20it%20wouldn't%20really%20help%20our%20specific%20scenario.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1691969%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Teams%20logout%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1691969%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F793024%22%20target%3D%22_blank%22%3E%40awarwick%3C%2FA%3E%26nbsp%3BHi%2C%20just%20to%20be%20clear%20as%20this%20hasn't%20been%20mentioned.%20Are%20these%20users%20manually%20signing%20out%20from%26nbsp%3B%20Teams%20as%20well%3F%20(top%20right%20corner).%20Teams%20uses%20modern%20authentication%20and%20the%20process%20and%20different%20scenarios%20such%20as%20MFA%2C%20domain-joined%20or%20not%20etc.%20are%20being%20described%20in%20the%20previous%20link%20I%20attached.%20Perhaps%20this%20is%20already%20taken%20into%20consideration%20but%20need%20to%20ask.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1692197%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Teams%20logout%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1692197%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F551905%22%20target%3D%22_blank%22%3E%40bec064%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThat's%20correct.%26nbsp%3B%20The%20users%20will%20use%20the%20logout%20option%20in%20the%20menu%20at%20the%20top%20left%2C%20but%20when%20they%20go%20to%20sign%20in%20again%2C%20they%20enter%20their%20username%2C%20click%20next%2C%20and%20then%20are%20signed%20in%20without%20a%20password.%26nbsp%3B%20This%20behaves%20the%20same%20way%20after%20a%20reboot%20as%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20PC%20is%20domain%20joined%2C%20and%20we%20are%20starting%20to%20implement%20MFA%2C%20but%20this%20issue%20existed%20before%20any%20of%20our%20users%20were%20setup%20with%20MFA.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20link%20in%20your%20first%20response%20didn't%20really%20help.%26nbsp%3B%20It%20seems%20to%20describe%20how%20it's%20supposed%20to%20work%2C%20and%20by%20their%20description%20it%20sounds%20like%20using%20the%20logout%20function%20should%20cause%20Teams%20to%20prompt%20for%20a%20password%20again%2C%20but%20that's%20not%20what%20we%20are%20seeing%20here.%26nbsp%3B%20Where%20I%20am%20at%20so%20far%2C%20even%20after%20using%20the%20logout%20function%2C%20the%20PC%20will%20never%20ask%20for%20a%20password%20for%20that%20account%20again%2C%20until%20the%20PC%20is%20fully%20reimaged.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1694106%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Teams%20logout%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1694106%22%20slang%3D%22en-US%22%3EDo%20they%20have%20to%20use%20the%20desktop%20app%3F%20Whats%20the%20purpose%20of%20the%20shared%20computers%3F%20Looked%20at%20Teams%20Rooms%3F%20(on%20mobile%20so%20being%20brief).%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2127997%22%20slang%3D%22en-US%22%3EMS%20Team%20login%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2127997%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20an%20issue%20with%20the%20MS%20Team%20login.%3C%2FP%3E%3CP%3EI%20have%202%20account%3C%2FP%3E%3CP%3E1.%20From%20IT%20Team%3C%2FP%3E%3CP%3E2.%20Reigning%20Champs%3C%2FP%3E%3CP%3Eon%20the%20same%20email.%20I%20have%20successfully%20login%20into%20both%20accounts.%20But%20whenever%20my%20system%20restart.%20Champs%20accounts%20are%20not%20opening.%20It%20is%20giving%20an%20error.%20But%20IT%20account%20always%20open%20in%20the%20MS%20team.%3C%2FP%3E%3CP%3EI%20have%20cleared%20data%3C%2FP%3E%3CP%3EClear%20MS%20Team%20Cache%3A%3CBR%20%2F%3E%25AppData%25%5CMicrosoft%5Cteams%5Capplication%20cache%5Ccache%3CBR%20%2F%3E%25AppData%25%5CMicrosoft%5Cteams%5Cblob_storage%3CBR%20%2F%3E%25AppData%25%5CMicrosoft%5Cteams%5Cdatabases%3CBR%20%2F%3E%25AppData%25%5CMicrosoft%5Cteams%5Ccache%3CBR%20%2F%3E%25AppData%25%5CMicrosoft%5Cteams%5Cgpucache%3CBR%20%2F%3E%25AppData%25%5CMicrosoft%5Cteams%5CIndexeddb%3CBR%20%2F%3E%25AppData%25%5CMicrosoft%5Cteams%5CLocal%20Storage%3CBR%20%2F%3E%25AppData%25%5CMicrosoft%5Cteams%5Ctmp%3CBR%20%2F%3E%25LocalAppData%25%5CGoogle%5CChrome%5CUser%20Data%5CDefault%5CCache%3CBR%20%2F%3E%25LocalAppData%25%5CGoogle%5CChrome%5CUser%20Data%5CDefault%5CCookies%3CBR%20%2F%3E%25LocalAppData%25%5CGoogle%5CChrome%5CUser%20Data%5CDefault%5CWeb%20Data%3C%2FP%3E%3CP%3EBut%20there%20is%20going%20to%20the%20same%20account%20to%20champs%20account.%3C%2FP%3E%3CP%3Ewhen%20un-install%20then%20it%20will%20work%20but%20sometimes%20is%20not%20work.%20My%20local%20system%20is%20working%20fine.%20but%20the%20office%20system%20is%20not%20working.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22vikashrana_1-1613133444470.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F254456iB314290FC6E2AFD5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22vikashrana_1-1613133444470.png%22%20alt%3D%22vikashrana_1-1613133444470.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20didn't%20find%20any%20correct%20solutions%20also%20there%20are%20not%20correct%20solutions%20every%20time%20un-install%20the%20MS%20team.%3C%2FP%3E%3CP%3EVery%20bad%20experience%20with%20MS%20team.%20I%20think%20I%20will%20not%20refer%20to%20this.%20there%20it%2C%20not%20any%20clear%20cache%20to%20clear%20the%20account%20and%20go%20to%20Champs%20account.%3C%2FP%3E%3CP%3ESorry%20about%20that%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3ERajput%20Vikash%20Rana%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2274541%22%20slang%3D%22en-US%22%3ERe%3A%20MS%20Team%20login%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2274541%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F964781%22%20target%3D%22_blank%22%3E%40vikashrana%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3Etry%20this%20powershell%20script%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E%23Stop%20Teams%20process%20%0AGet-Process%20-ProcessName%20Teams%20-ErrorAction%20SilentlyContinue%20%7C%20Stop-Process%20-Force%20%0AStart-Sleep%20-Seconds%203%0AWrite-Host%20%22Teams%20Process%20Sucessfully%20Stopped%22%20%0A%0A%23Clear%20Team%20Cache%0Atry%7B%0AGet-ChildItem%20-Path%20%24env%3AAPPDATA%5C%22Microsoft%5Cteams%5Cblob_storage%22%20%7C%20Remove-Item%20-Recurse%20-ErrorAction%20SilentlyContinue%0AGet-ChildItem%20-Path%20%24env%3AAPPDATA%5C%22Microsoft%5Cteams%5Cdatabases%22%20%7C%20Remove-Item%20-Recurse%20-ErrorAction%20SilentlyContinue%0AGet-ChildItem%20-Path%20%24env%3AAPPDATA%5C%22Microsoft%5Cteams%5Ccache%22%20%7C%20Remove-Item%20-Recurse%20-ErrorAction%20SilentlyContinue%0AGet-ChildItem%20-Path%20%24env%3AAPPDATA%5C%22Microsoft%5Cteams%5Cgpucache%22%20%7C%20Remove-Item%20-Recurse%20-ErrorAction%20SilentlyContinue%0AGet-ChildItem%20-Path%20%24env%3AAPPDATA%5C%22Microsoft%5Cteams%5CIndexeddb%22%20%7C%20Remove-Item%20-Recurse%20-ErrorAction%20SilentlyContinue%0AGet-ChildItem%20-Path%20%24env%3AAPPDATA%5C%22Microsoft%5Cteams%5CLocal%20Storage%22%20%7C%20Remove-Item%20-Recurse%20-ErrorAction%20SilentlyContinue%0AGet-ChildItem%20-Path%20%24env%3AAPPDATA%5C%22Microsoft%5Cteams%5Ctmp%22%20%7C%20Remove-Item%20-Recurse%20-ErrorAction%20SilentlyContinue%0AWrite-Host%20%22Teams%20Cache%20Cleaned%22%20%0A%7Dcatch%7B%0Aecho%20%24_%20%0A%7D%0A%0A%23Remove%20Credential%20from%20Credential%20manager%0A%24credential%20%3D%20cmdkey%20%2Flist%20%7C%20ForEach-Object%7Bif(%24_%20-like%20%22*Target%3A*%22%20-and%20%24_%20-like%20%22*msteams*%22)%7Bcmdkey%20%2Fdel%3A(%24_%20-replace%20%22%20%22%2C%22%22%20-replace%20%22Target%3A%22%2C%22%22)%7D%7D%0A%0A%23Remove%20Reg.Key%0A%24Regkeypath%3D%20%22HKCU%3A%5CSoftware%5CMicrosoft%5COffice%5CTeams%22%20%0A%24value%20%3D%20(Get-ItemProperty%20%24Regkeypath).HomeUserUpn%20-eq%20%24null%0AIf%20(%24value%20-eq%20%24False)%20%0A%7B%20%0A%20%20Remove-ItemProperty%20-Path%20%22HKCU%3A%5CSoftware%5CMicrosoft%5COffice%5CTeams%22%20-Name%20%22HomeUserUpn%22%0A%20%20Write-Host%20%22The%20registry%20value%20Sucessfully%20removed%22%20%0A%7D%20%0AElse%20%7B%20Write-Host%20%22The%20registry%20value%20does%20not%20exist%22%7D%0A%0A%23Get%20Desktop-config.json%0A%24TeamsFolders%20%3D%20%22%24env%3AAPPDATA%5CMicrosoft%5Cteams%22%0Atry%7B%0A%24SourceDesktopConfigFile%20%3D%20%22%24TeamsFolders%5Cdesktop-config.json%22%0A%24desktopConfig%20%3D%20(Get-Content%20-Path%20%24SourceDesktopConfigFile%20%7C%20ConvertFrom-Json)%0A%7D%0Acatch%7B%20Write-Host%20%22Failed%20to%20open%20Desktop-config.json%22%20%7D%0A%0A%23Overwrite%20the%20desktop-config.json%0AWrite-Host%20%22Modify%20desktop-Config.Json%22%0Atry%7B%0A%24desktopConfig.isLoggedOut%20%3D%20%24true%0A%24desktopConfig.upnWindowUserUpn%20%3D%22%22%3B%20%23The%20email%20used%20to%20sign%20in%0A%24desktopConfig.userUpn%20%3D%22%22%3B%0A%24desktopConfig.userOid%20%3D%22%22%3B%0A%24desktopConfig.userTid%20%3D%20%22%22%3B%0A%24desktopConfig.homeTenantId%20%3D%22%22%3B%0A%24desktopConfig.webAccountId%3D%22%22%3B%0A%24desktopConfig%20%7C%20ConvertTo-Json%20-Compress%20%7C%20Set-Content%20-Path%20%24SourceDesktopConfigFile%20-Force%0A%7D%0Acatch%7B%20Write-Host%20%22Failed%20to%20overwrite%20desktop-config.json%22%20%7D%0AWrite-Host%20%22Modify%20desktop-Config.Json%20-%20Finished%22%0A%0A%23Lastly%20delete%20the%20storage.json%2C%20this%20corrects%20some%20error%20that%20MSTeams%20otherwise%20would%20have%20when%20logging%20in%20again.%0AGet-ChildItem%20%22%24TeamsFolders%5Cstorage.json%22%20%7C%20Remove-Item%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2310892%22%20slang%3D%22de-DE%22%3ESubject%3A%20MS%20Teams%20logout%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2310892%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F793024%22%20target%3D%22_blank%22%3E%40awarwick%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDear%20awarwick%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20you%20for%20already%20bringing%20up%20this%20issue.%20I%20just%20stumbled%20on%20the%20same%20problem%2C%20as%20we%20use%20a%20shared%20laptop%20in%20our%20university%20group%20for%20teaching%20activities.%20As%20you%20already%20pointed%20out%2C%20the%20critical%20point%20is%20whether%20you%20accept%20or%20decline%20to%20let%20your%20company%20manage%20your%20account%20while%20logging%20in%20for%20the%20first%20time%20in%20Microsoft%20Teams%20Desktop.%20After%20accepting%20this%20option%20I%20failed%20in%20a%20similar%20way%20to%20log%20out.%20I%20am%20a%20bit%20surprised%20that%20Microsoft%20does%20not%20provide%20an%20intuitive%20way%20to%20resolve%20this%20issue%20already%20in%20Teams%20or%20the%20login%20window.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20not%20a%20specialist%2C%20but%20could%20resolve%20the%20issue%20for%20me%20in%20the%20following%20way%20(...%20after%20some%20time)%3A%3C%2FP%3E%3CP%3EClick%20%22Start%22%20-%26gt%3B%20click%20%22Settings%20-%26gt%3B%20click%20%22Accounts%22%20-%26gt%3B%20choose%20%22Access%20work%20or%20school%22.%20There%20you%20can%20delete%20your%20account%20from%20the%20system.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%2C%20%3CBR%20%2F%3E%20Johann%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2316213%22%20slang%3D%22en-US%22%3EBetreff%3A%20MS%20Teams%20logout%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2316213%22%20slang%3D%22en-US%22%3Eit%20works%2C%20If%20the%20users%20have%20enough%20rights%3CBR%20%2F%3Ethis%20is%20a%20risk%20for%20us%20if%20the%20users%20do%20not%20do%20this%2C%20so%20we%20use%20the%20logoff%20script%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2321989%22%20slang%3D%22en-US%22%3EBetreff%3A%20MS%20Teams%20logout%20issue%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2321989%22%20slang%3D%22en-US%22%3EI%20appreciate%20Your%20efforts%20but%20i%20won't%20use%20Your%20script.%20Your%20script%20is%20mere%20third%20party%20workaround.%20Nothing%20more.%20Not%20a%20fix%20for%20a%20problem.%20I%20am%20not%20going%20to%20add%2C%20modify%20or%20delete%20any%20entries%20using%20tdp%20scripts%2C%20not%20in%20case%20where%20desktop%20app%20has%20an%20explicit%20function%20to%20logout%20user%20-%20function%20which%20doesn't%20do%20what%20it%20should.%3C%2FLINGO-BODY%3E
New Contributor

I am trying to figure out an issue with MS Teams, and not having much luck, so I'm wondering if anyone else has encountered this before.

 

We have a shared PC in a conference room that people will use to log into a shared user account, and then into their personal Teams account during their meeting. The problem is that some users' accounts seem to be cached on the PC, and all you need to do to log into their account is enter their email, no password required.

 

I have tried the following, with no luck so far:

  • Completely cleared out credential manager
  • Deleted the contents of %AppData%\Microsoft\Teams
  • Deleted the contents of HKLM\Software\Microsoft\Office\Teams
  • Uninstall/reinstall with Revo Uninstaller to also remove leftover registry/folder items

 

I finally reimaged the computer I was testing on, which of course fixed the issue, but there has to be a less invasive solution that I just haven't found yet.

 

Thanks in advance.

13 Replies

@awarwick Hello, you can prevent the pre-population of the UPN with a registry key.

 

Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\Teams
SkipUpnPrefill(REG_DWORD)
0x00000001 (1)

 

https://docs.microsoft.com/en-us/microsoftteams/sign-in-teams#windows-users

@ChristianBergstrom This does not actually solve the problem I mentioned, it only prevents Teams from auto-populating the username.

 

Through a little bit more testing, I've narrowed it down a little farther.  It as long as I click on "No, sign in to this app only" on the attached image, my login is not remembered and I need to enter a password every time I log in.  However, as soon as I click OK in this window, whether the "Allow my organization to manage my device" checkbox is checked or not, my password is saved on this Teams login going forward, and there's no way to reverse it short of fully reimaging the computer (at least that I have found so far).  And until I reimage the PC, anyone can log into my Teams account using only my email address, no password required.

 

Also note that this is related to our conference room PCs, which use a shared Windows login, so I'm guessing you might not have this issue without shared logins, I just haven't tested that yet since it wouldn't really help our specific scenario.

@awarwick Hi, just to be clear as this hasn't been mentioned. Are these users manually signing out from  Teams as well? (top right corner). Teams uses modern authentication and the process and different scenarios such as MFA, domain-joined or not etc. are being described in the previous link I attached. Perhaps this is already taken into consideration but need to ask.

@ChristianBergstrom 

That's correct.  The users will use the logout option in the menu at the top left, but when they go to sign in again, they enter their username, click next, and then are signed in without a password.  This behaves the same way after a reboot as well.

 

The PC is domain joined, and we are starting to implement MFA, but this issue existed before any of our users were setup with MFA.

 

The link in your first response didn't really help.  It seems to describe how it's supposed to work, and by their description it sounds like using the logout function should cause Teams to prompt for a password again, but that's not what we are seeing here.  Where I am at so far, even after using the logout function, the PC will never ask for a password for that account again, until the PC is fully reimaged.

Do they have to use the desktop app? Whats the purpose of the shared computers? Looked at Teams Rooms? (on mobile so being brief).

Hi,

I have an issue with the MS Team login.

I have 2 account

1. From IT Team

2. Reigning Champs

on the same email. I have successfully login into both accounts. But whenever my system restart. Champs accounts are not opening. It is giving an error. But IT account always open in the MS team.

I have cleared data

Clear MS Team Cache:
%AppData%\Microsoft\teams\application cache\cache
%AppData%\Microsoft\teams\blob_storage
%AppData%\Microsoft\teams\databases
%AppData%\Microsoft\teams\cache
%AppData%\Microsoft\teams\gpucache
%AppData%\Microsoft\teams\Indexeddb
%AppData%\Microsoft\teams\Local Storage
%AppData%\Microsoft\teams\tmp
%LocalAppData%\Google\Chrome\User Data\Default\Cache
%LocalAppData%\Google\Chrome\User Data\Default\Cookies
%LocalAppData%\Google\Chrome\User Data\Default\Web Data

But there is going to the same account to champs account.

when un-install then it will work but sometimes is not work. My local system is working fine. but the office system is not working.

vikashrana_1-1613133444470.png

 

I didn't find any correct solutions also there are not correct solutions every time un-install the MS team.

Very bad experience with MS team. I think I will not refer to this. there it, not any clear cache to clear the account and go to Champs account.

Sorry about that

Thanks

Rajput Vikash Rana

 

@vikashrana 

try this powershell script:

#Stop Teams process 
Get-Process -ProcessName Teams -ErrorAction SilentlyContinue | Stop-Process -Force 
Start-Sleep -Seconds 3
Write-Host "Teams Process Sucessfully Stopped" 

#Clear Team Cache
try{
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\blob_storage" | Remove-Item -Recurse -ErrorAction SilentlyContinue
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\databases" | Remove-Item -Recurse -ErrorAction SilentlyContinue
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\cache" | Remove-Item -Recurse -ErrorAction SilentlyContinue
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\gpucache" | Remove-Item -Recurse -ErrorAction SilentlyContinue
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Indexeddb" | Remove-Item -Recurse -ErrorAction SilentlyContinue
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\Local Storage" | Remove-Item -Recurse -ErrorAction SilentlyContinue
Get-ChildItem -Path $env:APPDATA\"Microsoft\teams\tmp" | Remove-Item -Recurse -ErrorAction SilentlyContinue
Write-Host "Teams Cache Cleaned" 
}catch{
echo $_ 
}

#Remove Credential from Credential manager
$credential = cmdkey /list | ForEach-Object{if($_ -like "*Target:*" -and $_ -like "*msteams*"){cmdkey /del:($_ -replace " ","" -replace "Target:","")}}

#Remove Reg.Key
$Regkeypath= "HKCU:\Software\Microsoft\Office\Teams" 
$value = (Get-ItemProperty $Regkeypath).HomeUserUpn -eq $null
If ($value -eq $False) 
{ 
  Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Office\Teams" -Name "HomeUserUpn"
  Write-Host "The registry value Sucessfully removed" 
} 
Else { Write-Host "The registry value does not exist"}

#Get Desktop-config.json
$TeamsFolders = "$env:APPDATA\Microsoft\teams"
try{
$SourceDesktopConfigFile = "$TeamsFolders\desktop-config.json"
$desktopConfig = (Get-Content -Path $SourceDesktopConfigFile | ConvertFrom-Json)
}
catch{ Write-Host "Failed to open Desktop-config.json" }

#Overwrite the desktop-config.json
Write-Host "Modify desktop-Config.Json"
try{
$desktopConfig.isLoggedOut = $true
$desktopConfig.upnWindowUserUpn =""; #The email used to sign in
$desktopConfig.userUpn ="";
$desktopConfig.userOid ="";
$desktopConfig.userTid = "";
$desktopConfig.homeTenantId ="";
$desktopConfig.webAccountId="";
$desktopConfig | ConvertTo-Json -Compress | Set-Content -Path $SourceDesktopConfigFile -Force
}
catch{ Write-Host "Failed to overwrite desktop-config.json" }
Write-Host "Modify desktop-Config.Json - Finished"

#Lastly delete the storage.json, this corrects some error that MSTeams otherwise would have when logging in again.
Get-ChildItem "$TeamsFolders\storage.json" | Remove-Item

 

@awarwick 

 

Dear awarwick,

 

thank you for already bringing up this issue. I just stumbled on the same problem, as we use a shared laptop in our university group for teaching activities. As you already pointed out, the critical point is whether you accept or decline to let your company manage your account while logging in for the first time in Microsoft Teams Desktop. After accepting this option I failed in a similar way to log out. I am a bit surprised that Microsoft does not provide an intuitive way to resolve this issue already in Teams or the login window.

 

I am not a specialist, but could resolve the issue for me in the following way (...after some time):

Click "Start" -> click "Settings -> click "Accounts" -> choose "Access work or school". There you can delete your account from the system.

 

Best regards,
Johann

 

it works, If the users have enough rights
this is a risk for us if the users do not do this, so we use the logoff script
I appreciate Your efforts but i won't use Your script. Your script is mere third party workaround. Nothing more. Not a fix for a problem. I am not going to add, modify or delete any entries using tdp scripts, not in case where desktop app has an explicit function to logout user - function which doesn't do what it should.
I realize your post is old, but this was the first result that popped up when I searched this issue so I thought I would share my solution here for anyone else who comes looking.

In Windows 10, open Settings -> Accounts -> Access work or school

Click on the account you want Teams to forget, then click Disconnect.

I tried deleting/disconnecting my school account but teams on my computer still won't let me logout. Any ideas? Thanks @Erin_Rose5 

this is how to disconnect, but the real issue is how to stop windows from adding the Teams login account into "email and accounts" in the first place.
www.000webhost.com