If you manage to log in to your Microsoft Teams account, you’re luckier than many other users out there. Login errors are among some of the most common glitches affecting the app. And they almost always occur at the worst possible time. After all, you know what Finagle’s law of dynamic negatives says: “Anything that can go wrong, will—at the worst possible moment.”
The env_check_error is a rare login error that prevents Teams users from signing in. Basically, it indicates Teams failed to connect to the settings endpoint. In this guide, we’ll explore what troubleshooting methods you can use to fix it.
Fix Microsoft Reams env_check_error on Windows and Mac
Delete the Settings.json File
Windows 10
- Exit Teams completely and navigate to C:\Users\UserName\AppData\Roaming\Microsoft\Teams.
- Then locate and delete the Settings.json file.
- Launch Teams again and check if you can log in now.
Mac
If you’re used to using Terminal, you can quickly delete the file by running this command: rm /Users/UserName/Library/Application\ Support/Microsoft/Teams/settings.json.
Or you can navigate to Home → Library → Application Support→ Microsoft → Teams folder. Open the Teams folder and delete the Settings.json file.
Clean the Hosts File
Additionally, certain entries in your Hosts file could be blocking Microsoft’s servers. Close Teams, ensure the Hosts file is clean, and try to sign in to your account again. Resetting the Hosts file to default settings can help fix connectivity issues.
Steps to Reset the Hosts File on Windows 10
- Launch Notepad and paste the following script into the new file:
- # Copyright (c) 1993-2006 Microsoft Corp. # # This is a sample HOSTS file used by Microsoft TCP/IP for Windows. # # This file contains the mappings of IP addresses to host names. Each # entry should be kept on an individual line. The IP address should # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may be inserted on individual # lines or following the machine name denoted by a ‘#’ symbol. # # For example: # # 102.54.94.97 rhino.acme.com # source server # 38.25.63.10 x.acme.com # x client host # localhost name resolution is handle within DNS itself. # 127.0.0.1 localhost # ::1 localhost
- Then click on the File menu, select Save as, and type “hosts” in the File name box.
- Save the file to your desktop and exit Notepad.
- Then go to %WinDir%\System32\Drivers\Etc and open the Etc folder.
- Right-click the Hosts file, select Rename, and name the file Hosts.old.
- You can now move the Hosts file you saved on your desktop to the Etc folder. Check if the env_check_error persists.
Steps to Reset the Hosts File on Mac
- Start Terminal and enter sudo nano /etc/hosts.
- Then hit the Return key and type in your passoword when prompted.
- You can now edit your Mac Hosts file.
- Check if there are any entries in the Hosts file that might be blocking Teams. Remove all of them.
An Alternative Method
- Launch Finder, hit the Go menu, and select Go to folder.
- Then enter /private/etc/hosts and press Enter.
- Drag the Hosts file to your desktop.
- Open it using your default text editor and delete all the entries.
- You can then paste the default Mac Hosts file script into the Hosts file:
##
# Host Database
#
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost.
Drag the Hosts file back to its original folder and check if Teams is working properly now.
For more information about editing your Hosts file, see How to Edit Your Mac’s Hosts File & Why You Might Want To.
Clear the Cache
Clearing the cache helps you to delete temporary files that may be blocking your connection to Microsoft’s servers. Meanwhile, don’t forget to backup important data before following the steps below.
Windows
- Exit Teams and close all the Office processes running in the background.
- Then type in %appdata%\Microsoft\teams in the Windows search bar.
- Delete all the files from the following Teams folders:
- %appdata%\Microsoft\teams\application cache\cache
- %appdata%\Microsoft\teams\blob_storage
- %appdata%\Microsoft\teams\Cache
- %appdata%\Microsoft\teams\databases
- %appdata%\Microsoft\teams\GPUcache
- %appdata%\Microsoft\teams\IndexedDB
- %appdata%\Microsoft\teams\Local Storage
- %appdata%\Microsoft\teams\tmpdelete teams cache files.
- Restart your computer and launch Teams again.
Mac
- Quit Microsoft Teams. Launch Finder and hold down the Option key. Click on the Go menu and select Library.
- Then go to “~/Library/Application Support/Microsoft/Teams/ and open the Teams folder.
- Delete the files in the following folders: Application Cache, blob_storage, Cache, databases, GPUCache, IndexedDB, Local Storage, and tmp.
- Launch Teams again and check if the error persists.
Conclusion
To sum up, you can quickly fix the env_check_error by deleting the Settings.json file. Meanwhile, if that method doesn’t work, reset the Hosts file to default settings and clear the app cache.
Let us know which solution worked for you. Let’s continue the conversation in the comments below.
I have similar error and I couldn’t find a solution, in logs file I found some errors but the teams window show this error:
Error code – caa20002
There’s a more permanent way to sign in to Microsoft Teams.
Could you help me? Thanks!