Below you will find pages that utilize the taxonomy term “Microsoft 365 group”
posts
Prevent Guests from Being Added to a Specific Microsoft 365 Group or Microsoft Teams team using PnP PowerShell
Introduction By default, guest access for Microsoft 365 groups is enabled within the tenant. This can be controlled either to allow or block guest access at the tenant level or for individual Microsoft 365 groups / Teams. For more information, check out Manage guest access in Microsoft 365 groups.
PowerShell Script to Prevent Guest Access Below is a PowerShell script that allows you to disable/enable guest access for specific Microsoft 365 groups.