ikelike88: OK I think I figured it out. Teams will only accept URIs formatted like: msteams://teams.microsoft.com......
You can test this by running this from the command line: "teams msteams://teams.microsoft.com......"
Should get you directly into a meeting.
I believe this means that the MimeType specified in teams.desktop is incorrect. In any case, making these two edits should make it so that xdg-open works with Teams:
/usr/share/applications/teams.desktop:
[Desktop Entry]
Version=1.0
Type=Application
Name=Microsoft Teams - Preview
Comment=Microsoft Teams for Linux is your chat-centered workspace in Office 365.
Exec=/usr/bin/teams %U
Icon=teams
Terminal=false
StartupNotify=true
StartupWMClass=Microsoft Teams - Preview
Categories=AudioVideo;Network;
# Change the MimeType to msteams instead of teams. Leave everything else the same.
MimeType=x-scheme-handler/msteams;
X-KDE-Protocols=teams
~/.config/mimeapps.list
[Default Applications]
x-scheme-handler/msteams=teams.desktop
And then, as you mentioned, you have to rewrite "https" to "msteams" in meeting join URLs. In Google Chrome I used Requestly, and set up a "Replace Host" rule as follows:
Replace https://teams.microsoft.com with msteams://teams.microsoft.com
Edit: I've posted this issue in more of a bug-report format on the Q & A site: https://docs.microsoft.com/answers/questions/3401/mimetype-in-teamsdesktop-seems-to-be-incorrect.html