Managing Microsoft Teams Firewall requirements with Intune
>> The Problem
With over 44 million active users, Microsoft Teams creates a familiar headache: the annoying "Windows Security Alert" from Windows Firewall every time users try to share their screen.
The Teams executable requires an inbound Firewall rule when it detects users on the same domain network. Teams tries to create the rules automatically but they require admin permissions. Dismissing the prompt actually creates two BLOCKING Firewall rules for Teams.exe.
The complication: Teams.exe is usually installed PER-USER in the user's APPDATA folder (%localappdata%\Microsoft\Teams\current\Teams.exe), making it impossible to create a single rule via the built-in Firewall CSP.
>> The Script Solution
The official Microsoft script is simple but not intelligent. The improved script is specifically designed for Intune:
4. Upload the script. LEAVE SCRIPT SETTINGS AS-IS (runs in system context, NOT user context)
5. Assign to a GROUP OF USERS (not devices)
6. Review and click ADD
>> Troubleshooting
The script generates log files:
* System log: %windir%\Temp\log_Update-TeamsFWRules.txt
* User log: %localappdata%\Temp\log_Update-TeamsFWRules.txt
Key reminders:
* Assign to a group of USERS not devices
* DON'T run in the user's own context
* Intune Management Extension is required for PowerShell script execution
>> Conclusion
We now have a simple way of deploying Firewall rules that target programs installed in user profiles. This approach can be adapted for other per-user applications in the future.