Skip to main content

How to automatically add users to Matter in Microsoft Teams

Learn how to automate user addition to Matter in Microsoft Teams.

Sam Lepak avatar
Written by Sam Lepak
Updated this week

To save you time and make sure everyone can use Matter, we recommend automatically adding new team members to your Matter-connected Teams team and channel.

By adding new users to a team where Matter is installed, they will be automatically added to Matter. There are several ways to automate this process:

  • Azure Active Directory

  • Power Automate

  • PowerShell

Option 1: Use Dynamic Groups in Azure Active Directory

With Azure AD Premium P1 licenses, you can create dynamic groups that automatically update based on user attributes like department or role. These groups can then be used when creating new Teams.

  1. Create a Dynamic Group in Azure AD

    • Go to Azure Active Directory > Groups > New Group.

    • Choose “Security” or “Microsoft 365” as the group type.

    • Set “Membership type” to Dynamic User.

    • Define a rule to include users automatically (e.g., all users with department = 'Sales').

  2. Create a New Team from the Group

    • In Microsoft Teams, when creating a new Team, select the option to “Create from an existing Microsoft 365 group”.

    • Choose the dynamic group you created — it will include the correct users automatically.

Option 2: Automate with Power Automate

Power Automate (formerly Microsoft Flow) allows you to build custom workflows that trigger when a new Team is created. This option gives you more control over automation without relying on dynamic groups.

  1. Create a Power Automate Flow

    • Trigger: “When a new Team is created” (use Microsoft Graph API or webhook workaround, as there’s no out-of-the-box trigger for new Teams).

    • Action: Use the Microsoft Teams connector to automatically add users to the team.

  2. Add Users to Channels (Optional)

    • Use PowerShell and the Add-TeamChannelUser cmdlet to add the same user(s) to each standard channel in the Team.

Option 3: Automate with PowerShell

Since PowerShell doesn’t have event triggers like Power Automate, this approach would typically be run on a scheduled basis (e.g., via Task Scheduler or Azure Automation).

  1. Dynamically finds users based on specific attributes (like department).

  2. Adds those users to the newly created Teams.

  3. Optionally adds users to private/shared channels.

  4. Schedule this script daily/hourly using Windows Task Scheduler, Azure Automation Runbook, or add logic to detect new Teams by comparing a saved list of previously known Teams.

Did this answer your question?