Skip to content

Instantly share code, notes, and snippets.

@marcoimmel
Last active March 23, 2021 07:58
Show Gist options
  • Select an option

  • Save marcoimmel/86974f6e4958d94d78449bf0f58ee4b3 to your computer and use it in GitHub Desktop.

Select an option

Save marcoimmel/86974f6e4958d94d78449bf0f58ee4b3 to your computer and use it in GitHub Desktop.
Workaround for virtual camera not appearing in MS Teams settings on MacOS
#!/bin/sh
# Microsoft Teams has a code signing issue on MacOS, which means that virtual cameras can no longer be selected.
# Removing the signature is a workaround for that: https://answers.microsoft.com/en-us/msteams/forum/msteams_tfb-msteams_tfmac/microsoft-teams-mac-os-client-is-not-recognizing/d9e863be-d9a4-4d03-a4b8-1b5c7df58828
# This script implements the discussed workaround.
# I have tested it with MacOS BigSur and MS Teams
# - Version 1.3.00.28778
# - Version 1.3.00.30874
# - Version 1.3.00.33671
# - Version 1.4.00.4971
# - Version 1.4.00.7175
#
# Ensure that the script is executable after download: chmod u+x MST_camera_fix.sh
# The script needs administrator privileges, so run it as follows: sudo ./MST_camera_fix.sh
# Use this script on your own risk.
# MIT License
# Copyright (C) 2020 Marco Immel - marco.immel@gmail.com
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# Check if xcode is installed
# Source: https://apple.stackexchange.com/questions/219507/best-way-to-check-in-bash-if-command-line-tools-are-installed
if type xcode-select >&- && xpath=$( xcode-select --print-path ) && test -d "${xpath}" && test -x "${xpath}" ; then
echo "xcode is installed"
else
echo "installing xcode"
xcode-select --install
fi
MSTEAMS_BASE="/Applications/Microsoft Teams.app"
MSTEAMS_PATHS=(
"$MSTEAMS_BASE"
"$MSTEAMS_BASE/Contents/Frameworks/Microsoft Teams Helper.app"
"$MSTEAMS_BASE/Contents/Frameworks/Microsoft Teams Helper (GPU).app"
"$MSTEAMS_BASE/Contents/Frameworks/Microsoft Teams Helper (Plugin).app"
"$MSTEAMS_BASE/Contents/Frameworks/Microsoft Teams Helper (Renderer).app"
)
for d in "${MSTEAMS_PATHS[@]}"; do
if [ -d "$d" ]; then
echo "Found: $d"
codesign --remove-signature "$d"
else
echo "Did not find directory: $d"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment