Disabling guest access for one team

Guest access is on in your organisation, but for one team, such as Board or HR, you don't want external people. You can block guests per team. Without PowerShell you do that with a sensitivity label. This article shows how, and how it works with PowerShell.

With a sensitivity label (no PowerShell)

  1. Make sure sensitivity labels for groups and sites are enabled in your organisation (a one-time admin task).
  2. Go to purview.microsoft.com > Information protection > Sensitivity labels > Create a label, for example Internal - no guests.
  3. Choose Groups & sites as the scope.
  4. Under Privacy and external user access, untick Let Microsoft 365 group owners add people outside your organization to the group as guests.
  5. Publish the label with a label policy.
  6. Pick the label in Teams under Manage team > Settings, or when creating a new team.

Existing guests stay members until you remove them. New guests can no longer be added.

Disabling guest access for one team

Licence

Sensitivity labels for groups require Entra ID P1 and a licence with Purview information protection, such as Microsoft 365 Business Premium or E3.

With PowerShell

Without labels, set AllowToAddGuests to false for that one group, using Microsoft Graph PowerShell directory settings. It works, but it's harder to manage than a label.

Check it

Try adding an external address as an owner. Teams says guests aren't allowed in this team.

Tips

Read also

How to add external guests in Microsoft Teams
Completely remove a guest or old account from SharePoint Online
Set up Data Loss Prevention (DLP) in Microsoft Teams with Purview

Nederlandstalige versie: Gasttoegang uitschakelen voor één Microsoft Teams-team


More in English