This message was deleted.
# microsoft-365
s
This message was deleted.
r
Not yet, but thanks for the reddit link that helps clarify where the heck the auto start is being saved.
d
The settings are stored in this file: %localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\app_settings.json Powershell script you can run at logon via script or WEM task. This works after the first start of MS Teams, because the file has to be created. Another trick is to use an external task and run the script at logon and when the process “ms-teams.exe” starts. The settings are in place after the first launch of Teams. Example:
param(
[boolean]$KeepAppRunningOnClose=$False # Enable or disable keep running Teams on close
)
# Path for Teams user settings
$TeamsSettings = "$ENV:LOCALAPPDATA\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams"
# Get Teams configuration and convert file content from JSON format to PowerShell object
$JSONObject=Get-Content -Raw -Path "$TeamsSettings\app_settings.json" | ConvertFrom-Json
# Update object settings
$JSONObject.keep_app_running_on_close=$KeepAppRunningOnClose
$NewFileContent=$JSONObject | ConvertTo-Json
# Update configuration in file
$NewFileContent | Set-Content -Path "$TeamsSettings\app_settings.json"
💯 1
r
I am leaning on testing it out via WEM Json section myself. Thanks for the update here though.
@Deyda has it now in neverred.
👍🏼 1
d
Yes, I thought so too. Is it correct that you can only change the file or is a new file always created? If you use the JSON WEM action.
Oh wait… Specify the path to the JSON file that you want the object to modify. The specified content is merged with the existing content in the target file.
r
"WEM has an option for Create file if it does not exist allowing you to pre-stage the file with the appropriate settings to address first run challenges (Create file if it does not exist)." Was reading this too
Older Teams, but the principle should apply
d
I will give it a try
r
Yea let me know how that goes. It is on my list next as well.
👍🏼 1
@Dennis By chance, have you testing the image background things that was released on the older teams for the newer teams via workspace app parts? Something else I have to nail down.
d
No, that’s on my list, too 😁
r
LOL, Well, if I get to it. I will pass the result to you.
It's coming in hard like a missile, so I must test it soon.
d
OK, the first attempt failed with the JSON action.
The file wasn’t created, maybe because the folder in local appdata doesn’t exist?
d
Which json file ? If u install it with NeverRed I create the roaming /microsoft/teams folder and a empty settings.json file in it for the outlook addin
d
%localappdata%\Packages\MSTeams_8wekyb3d8bbwe\LocalCache\Microsoft\MSTeams\app_settings.json To modify the user settings
Hi Manuel 😉 The folder gets created after the first launch of Teams. We are able to modify the JSON with powershell, but it would be nice to use the JSON action from WEM.
image.png,image.png
The action applies, but nothing in the folder even after creating the folder manually.
My fault… 🙈 Process JSON files wasn’t enabled! Next try…
OK, it doesn’t quite work! JSON file gets created after logon with the appropriate settings, but after launching Teams the file gets overwritten 😞. After closing Teams and refresh WEM agent the JSON file is backed up, gets modified and the settings are correct. But I think for now, I can live with that… Enough Teams shit for today, see u 🍻
r
I tested this as well, I can validate the same as you experienced. the json file has to be created first with teams. Then you can control it via wem. Trying to think of a way to pre stage it for users. But as of now, i don't think it's possible due to how it's created and referenced at first, and it's dependent on the profile location to exist.