Forum Discussion

michalfiserconseqcz's avatar
michalfiserconseqcz
Copper Contributor
Oct 18, 2023
Solved

Teams Desktop App stuck at Loading.. during first run after install

Hello everyone,

we are experiencing an issue with teams app first run. It is stuck in Loading screen forewer.

Distribution is done by Machine-Wide installer across the company computers, either Windows 10 AD joined computers with hybrid AAD join, or Windows 11 AAD join computers.

In both cases the behavior is the same. 

When user tries to run Teams app for the first time (even with brand new windows profile created), Teams is showing Loading.. and nothing happens. If we kill the Teams app and the app process and run it again, it starts fine and login with the AD user account automatically.

So the issue is just during first start.

Issue is not related to specific version either, since it behaves the same accross different versions tested so far.

Obvious recommedations related to cleaning cache are not applicable, since the issue is on fresh Teams install which was not used so far.

 

Any ideas what could be the possible culprit would be much appreciated!

Thanks, Michal

 

 

  • Fernando_Klurfan's avatar
    Fernando_Klurfan
    Dec 15, 2023
    One workaround we are hearing for this issue is to create an empty settings.json file under
    AppData\Roaming\Microsoft\Teams
    This seems to fix the issue.

14 Replies

  • The root cause is Teams initializing before it can write its own settings file on first run. It gets stuck waiting for a config it has not created yet. The fix that works: pre-create an empty settings.json file at the expected path before Teams launches for the first time.

    %AppData%\Microsoft\Teams\settings.json Create the file with empty JSON content: json{} For your deployment at scale, push this as part of your machine-wide installer sequence. Use a startup script or your deployment tool to write that file to the user profile before Teams ever runs.

    On Intune-managed AAD joined devices you can deliver this via a PowerShell remediation script.

    On AD joined machines, a Group Policy logon script handles it cleanly.

    The second launch always works because Teams writes its own settings.json on exit, so the file exists by the time the user opens it again.

    That is exactly what you are seeing. AVD environments with AAD join confirm the same behaviour, so this is not a hybrid-specific issue.

    It is a first-run race condition Teams has not resolved across versions. What to check if the file pre-creation does not fully resolve it: Make sure the user profile path exists and is writable before the script runs.

    On hybrid AAD join with roaming profiles or folder redirection, AppData\Roaming may not be available at the exact moment the logon script fires.

  • Same problem here with AVD machines joined with AAD. We uninstalled, cleared the cache, and tried again. The problem still exists.

  • zetaman's avatar
    zetaman
    Copper Contributor

    Microsoft does not really know the answer. This would not happen if they do. 

  • LeonPavesic's avatar
    LeonPavesic
    Silver Contributor

    Hi michalfiserconseqcz,

    to try to solve this issue, you can try to use this steps:

    1. Uninstall Teams completely.
    2. Delete the Teams cache and temporary files.
      • Close Teams.
      • Press Windows key + R to open the Run dialog box.
      • Type %appdata%\Microsoft\Teams and press Enter.
      • Delete all the files and folders in the Teams folder.
    3. Restart your computer.
    4. Install Teams again from the Microsoft Teams download page.
    5. Run Teams as an administrator. Right-click on the Teams desktop icon and select "Run as administrator".

    Useful links:


    Please click Mark as Best Response & Like if my post helped you to solve your issue.
    This will help others to find the correct solution easily. It also closes the item.


    If the post was useful in other ways, please consider giving it Like.


    Kindest regards,


    Leon Pavesic
    (LinkedIn)

    • michalfiserconseqcz's avatar
      michalfiserconseqcz
      Copper Contributor

      Leon, thank you for your fast reply,
      unfortunatelly, this advice in not applicable in this situation, since the behavior described is happening on all computers, you can replicate it even on fresh installed machine with newly created user profile while the Teams app is the very first app started and was not used before.
      So there are no Teams cached files in user profile to delete and reinstalling freshly installed app doesn´t make sense either IMHO.

      On the other hand, the second start of app is always successful and it is loaded completely fine including automatic user login.
      M.

      • MMijs's avatar
        MMijs
        Copper Contributor

        michalfiserconseqcz  Did you ever found a solution? 

        We have the exact same problem. Fresh install of a Machine wide Installer gets stuck on only the first startup/login.