I have a little update I would like to share with the community regarding the issues I was running into. Might help someone else... ( Jason_Parker might be usefull to improve the product, so we do not have to do these tricks to make it work)
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.
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
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
After this teams will auto-start after a user has launched new teams once, and they are still able to modify the setting
Now I still have one issue remaining, perhaps someone else knows a solution for this. We would like to set some default configuration for new users (for instance enabling the "Open application in background" option by default). We tried this by placing a modified versions of "%localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\app_settings.json" before the user starts the new teams for the first time. But unfortunately the file is overwritten with a default configuration (entire folder is removed at first launch, we saw this in procmon traces we made).
How can we modify the user default settings?