Python script to automatically join Microsoft Teams meetings. https://github.com/kescherCode/Teams-Auto-Joiner
This repository has been archived on 2021-04-23. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Jeremy Kescher c95b6c9c5e Implement custom audio and video on/off by default options
Signed-off-by: Jeremy Kescher <jeremy@kescher.at>
2021-04-24 00:56:38 +02:00
.github/ISSUE_TEMPLATE Change bug report issue template 2020-08-26 10:38:30 +02:00
.gitignore Change requirements 2020-04-05 17:00:33 +02:00
LICENSE Create LICENSE 2020-07-28 18:02:07 +02:00
README.md Fix for Linux - see README.md 2021-03-04 09:07:26 +01:00
auto_joiner.py Implement custom audio and video on/off by default options 2021-04-24 00:56:38 +02:00
config.json.example Implement custom audio and video on/off by default options 2021-04-24 00:56:38 +02:00
requirements.txt Fix outdated requirements 2020-12-08 15:29:49 +01:00

README.md

Teams-Auto-Joiner

GitHub stars Donate

Python script to automatically join Microsoft Teams meetings. Automatically turns off your microphone and camera before joining. Blacklist can be set in the config file.

Always joins the newest meeting and leaves either after a specified time, if you are the last person in the meeting or only if a new one is available (see Configuration options for more information).

This is a fork

...with the following modifications:

  • Makes it work on GNU/Linux
  • Enforce persistent data (to save Teams settings)
  • Allows third-party cookies and doesn't delete data on exit
  • No longer allows Google Chrome or Microsoft Edge to be used (Chromium is enforced)

Prerequisites

Configuration options

  • run_at_time:
    Time to start the script at. Input is a string of the hour and minute in 24h format, if you want it to start immediately leave this empty. If a time before the current time is given, the next day is used. Also make sure that you entered your email and password. For example, if you want the script to start searching meetings at 6 in the morning on the next day, you would input 06:00 in the config.

  • meeting_mode: Change which meetings should be joined. Modes 1, 2 and 3 are available.
    1 Both channel and calendar meetings
    2 Only channel meetings
    3 Only calendar meetings

  • organisation_num: If your Teams account is in multiple organisations, as seen in the example below, change the organisation_num to the number of the list item (counting starts from 1)

  • random_delay: If true, adds a random delay (10s-30s) before joining a meeting. Can be useful so the bot seems more "human like".

  • check_interval: The amount of seconds to wait before checking for meetings again. Only integer numbers greater than 1 are allowed.

  • join_message: A chat message sent when a meeting is joined.

  • auto_leave_after_min: If set to a value greater than zero, the bot leaves every meeting after the specified time (in minutes). Useful if you know the length of your meeting, if this is left a the default the bot will stay in the meeting until a new one is available.

  • leave_if_last: If true, leaves the meeting if you are the last person in it.

  • leave_threshold_number: (Must enable leave_if_last for this to work) Sets the threshold number of people in the meeting before auto leaving. If number of people in meeting is less than this threshold, program will leave.

  • leave_threshold_percentage: (Must enable leave_if_last for this to work) Sets the threshold percentage of people still in the meeting before auto leaving.

  • pause_search: If true, doesn't search for new meetings while there is one active. Keep in mind to set auto_leave_after_min or leave_if_last, otherwise the bot will not search for meetings again.

  • headless: If true, runs Chrome in headless mode (does not open GUI window and runs in background).

  • mute_audio: If true, mutes all the sounds.

  • user-data-dir: Must be set in order to keep login data between sessions. Please set this.

  • blacklist: A list of Teams and their channels to ignore. Meetings ocurring in these channels w**ill not be joined. If you have a Team called "Test1" and, within that, two channels called "General" and "Channel1" and you don't want to join meetings in the "General" Channel:

"blacklist": [
  {
    "team_name": "Test1",
    "channel_names": [
      "General"
    ]
  }
]
  • blacklist_meeting_re: If calendar meeting title matches a regular expression, it goes to blacklist. Leave empty to attend to all meetings.

If you want to blacklist all the channels in a team, leave the square brackets empty: "channel_names": [].

Run the script

  1. Rename the config.json.example file to "config.json"
  2. Edit the "config.json" file to fit your preferences (optional)
  3. Install dependencies: pip install -r requirements.txt
  4. Run auto_joiner.py: python auto_joiner.py
  5. After starting, teams might be in Grid view, if this is the case change the view to list (How to do)