Thanks StevenM2330 for the detailed information.
Issue 1: Teams Autostart not roaming / saved in FSLogix container
By roaming the following 2 registry keys with our Ivanti Environment Manager profile solution I was able to make this work:
- HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask\State (DWORD)
- HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask\UserEnabledStartupOnce (DWORD)
Auto start setting in file %localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\app_settings.json is not the one that manages the autostart of teams, this seems only for display purposes in the interface.
If you are using FSLogix profile or profile with ODFC containers, then this doesn't make much sense. HKEY_CURRENT_USER is based on the NTUSER.dat file located inside the user's profile (in this case FSLogix container). FSLogix loads this hive from NTUSER.dat which is integral for the entire profile and not just Teams autostart. If you are not using the FSLogix profile container at all, then this makes more sense and seems like a gap in the profile solution you're using.
Issue 2: Error C:\Program Files\WindowsApps\MSTeams_24004.1307.2669.7070_x64__8wekyb…\msteams_autostarter.exe. Incorrect function
I managed to work around this issue by creating folder "%localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache" at logon if it isn't there already.
When you remove the FSLogix container for the user, somehow the default configuration isn't recreated. This causes the error. By creating the mentioned folder the default configuration is recreated and the application starts working again at logon
The Microsoft Teams and FSLogix engineering teams have not been able to reproduce this error in any of our testing environments. We have worked directly with 3 customers who've had this issue and all 3 customers resolved this issue with their various antivirus products (SentinelOne, Palo Alto, and Trend Micro). We have also worked directly with a customer who has this issue and the AV exclusions are not working. This customer had all the folders and paths populated correctly and it didn't appear to be anything related this path. While the path is important, in the cases we've seen, this path and structure has existed.
Question: What OS are you seeing this issue occur in? Can you share more about your environment or configuration? Please DM me or send me an e-mail as we are diligently working to solve these issues.
Issue 3: User has to disable/enable "Auto-start Teams" before auto-start works correctly. In the interface option is default enabled, but not working.
At logon check if HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask\State = 2, if so set HKEY_CURRENT_USER\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask\UserEnabledStartupOnce = 1
Similarly to Issue 1 above, FSLogix will roaming the user registry hive (NTUSER.dat) and relys on the data to be populated correctly for the user. If the registry keys are not getting set correctly, then we can take that to the Teams engineering team to review.
Thanks again for the details and feedback!