Sep 14 2020 07:56 AM
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:
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.
Sep 15 2020 02:17 AM
@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
Sep 21 2020 07:11 AM
@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.
Sep 21 2020 07:41 AM
@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.
Sep 21 2020 08:16 AM
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.
Sep 21 2020 11:20 AM
Feb 12 2021 04:38 AM
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.
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
Apr 15 2021 07:08 AM
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
Apr 30 2021 07:09 AM
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
May 02 2021 11:40 PM
May 04 2021 07:11 AM
May 12 2021 05:34 PM
Sep 08 2021 07:43 AM
I tried deleting/disconnecting my school account but teams on my computer still won't let me logout. Any ideas? Thanks @Erin_Rose5
Oct 11 2021 10:29 AM
Nov 30 2021 09:45 PM - edited Nov 30 2021 09:46 PM
Hey!! Thanks alot for this! The script code worked and the problem was solved!!!
Feb 22 2022 05:22 AM
Mar 25 2022 02:19 PM
Jul 04 2022 06:56 PM
Hi @awarwick
It is unbelievable we are even having this conversation. This is such a basic issue and one that would be so easy to test and fix if you were Microsoft - they have the source code.
I have noticed there are several different sign out boxes in teams (some on the same page) and in testing this problem they appear to work differently. It is unacceptable from a quality point of view (not to mention a CX perspective) for two identical menu options to operate in a different way. And if that wasn't the intention, then why have the two on the one screen?
I experience this problem (cannot log out of teams) on a MAC. I have two emails accounts I use for different teams families. This problem presents itself in a few different ways.
Sometime I even get a screen that invites me to enter one email address and password and then TEAMS logs me into my OTHER email's account. Microsoft seem to have an issue with identity where people writing the code make the incorrect assumption the whole world works with ONE email account. I had the same issue with federated identity in Queensland Health a few years ago - visiting medical officers ended up with two email accounts (their private one and the hospital's one).
I don't want workarounds for this. I want the problem fixed. It's just basic functionality that should just work.
Peter Grant
Jul 12 2022 10:51 AM
Jul 13 2022 02:59 PM
@Peter_Grantit's exactly what I said earlier. We can use workarounds, ok, but it is ridicule considering who brands Teams. I can use workarounds for small free apps written by nobody. And not able to log out is not the only problem i have met. The problem where application closes itself right after start without any explicit error is also haunting it. The best way to deal with both problems is just remove all Teams data placed in users folder.