i'm sure i know the answer to this already but wit...
# microsoft-365
a
i'm sure i know the answer to this already but with the new Teams client is there any way to centrally control settings like autostart , dark/light theme? or is it still all a b.s. json file locally thats a pain to manage and they want end users to just handle everything
d
JSON file (app_settings.json) located in %localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\ You can use a powershell script or WEM JSON action to edit the file like this:
# Register MS Teams AppX Package for user
Add-AppPackage -Register -DisableDevelopmentMode "$ENV:TeamsVersionPath\AppXManifest.xml" -EA SilentlyContinue
# Define the json file location
$TeamsConfig = "$ENV:LocalAPPDATA\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\app_settings.json"
# Make a backup of the json file
Copy-Item -Path $TeamsConfig -Destination "$TeamsConfig.bak" -Force
# Read the content
$jsonContent = Get-Content -Path $TeamsConfig -Raw
# Replace the values
$jsonContent = $jsonContent -replace '"open_app_in_background":true', '"open_app_in_background":false'
$jsonContent = $jsonContent -replace '"keep_app_running_on_close":true', '"keep_app_running_on_close":false'
# Save the modified json file
Set-Content -Path $TeamsConfig -Value $jsonContent -Force
Autostart: HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask State (DWORD) = 0
a
oh nice so you can use that reg key for that instead of screwing w/ the json possibly?
d
Autostart can be managed with the regkey, other settings with the JSON file.
a
ok good to know thank you!
why they make an enterprise tool but don't give admins a way to manage settings in group policy or intune is still pretty ridiculous
i make sure to bring that up on every MS account call that we have when they try and promote things like "hey your avatar can now have a top hat" or something like that 😂
😁 2
r
The whole light/dark theme is tricky. Looks like when you switch it the only thing I seen modified in the json file is the "main_window_state":1" 0 seems to be light and 1 seems to be dark. but again, that is a quick compare on the files and def seems wrong lol. I am sure it's captured somewhere else. I just havent dug down that far on things like that.
c
anything for "On close keep the application running" ? i used to configure this via the desktop-config json
r
It’s above
c
oh yeah didnt read that far up 👍 the powershell script listed does it need to run at userlogon or at process start ?
d
The json file will be generated after the first start of Teams. I’m sure after that, its sufficient to run the script at userlogon.
a
i do remember its something that you can't change things while teams is running. really can't believe they've done 2 revisions on the Teams client and this is the best option they've come up w/ for this
c
Thanks will use Ivanti UWM and use a if file exists condition %localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\app_settings.json and if it does exists then run the powershell script above that should do the trick
r
You can stage them ahead of time, but it's 50/50 at times that I seen. I just do what @Dennis does here.
c
Thats how i have done it was surprised the update text file option in ivanti allowed me to manipulate the json file. It seems to be working as option isnt selected and when i check the json file its changed
that will sort it once the app_settings.json file exists after first run of ms teams but is there a way to set it so the custom app_settings.json is configured at first launch for all users? i renamed app_settings.json to app_settings.bak simulating a first run and relaunched ms teams and app_settings.json got autocreated automatically but my appsense config didnt capture it in time to edit it as the app_settings.json file didnt exist at the time. The 2nd launch was fine it modifed the app_settings.json as required. Could i create the app_settings.json manually if it doesnt exist or copy it in if it doesnt exist ? or would that break ms teams as its created automatically
r
I tried doing this with WEM and couldn’t get it to work. But in the classic teams it would. So it’s worth a shot and testing to see on your side. I think @Dennis gave it a shot as well.
d
Yes, I also tried it and it didn’t work well.
a
'