Microsoft 365 groups should not be publicly visible
This check looks at the privacy setting of every Microsoft 365 group. The safe setting is that groups are Private, so people must be added or approved before they can read the group conversations and files.
Why it matters
A Public group can be read and joined by anyone in your organisation without approval. That includes the mailbox, the shared files and, if the group is behind a team, the team content. Groups made for a sensitive project often start Public by default and stay that way for years.
Microsoft documents the Public and Private options in Manage groups in the Microsoft 365 admin center, and the setting is exposed as the visibility property in the Microsoft Graph group resource.
How to check it yourself
In the Microsoft 365 admin center open Teams & groups > Active teams & groups, filter to Microsoft 365 groups and read the Privacy column. Any group marked Public is a finding.
Connect-MgGraph -Scopes "Group.Read.All"
Get-MgGroup -All -Filter "groupTypes/any(c:c eq 'Unified')" -Property DisplayName,Visibility,Mail |
Where-Object { $_.Visibility -eq 'Public' } |
Select-Object DisplayName,Mail,VisibilityThe command only reads. Run it on a test tenant first if you want to see the output shape.
How to fix it
Decide group by group. Some groups, such as an open company-wide community, are meant to be Public. For the rest:
- Open the group in Active teams & groups and choose Edit privacy, then select Private.
- Tell the group owners, because people will now need to ask to join.
Connect-MgGraph -Scopes "Group.ReadWrite.All"
# One group at a time; review the list from the check first
Update-MgGroup -GroupId "<group-id>" -Visibility "Private"ConfigCobra itself is read-only. It reports the Public groups and suggests the fix; you make the change.
What changes when you fix it
Existing members keep their access. New people can no longer join on their own: they send a request that an owner must approve, so owners get extra work. People who are not members cannot read its mail, files or team content. If a group relied on being open for self-service, for example a social or interest group, switch it back or give it a clear owner who answers requests. Items already shared by link are not affected by this setting.
Included in
| Benchmark | CIS ID | Profile |
|---|---|---|
| CIS Microsoft 365 Foundations v7.0.0 | 1.2.1 | E3 Level 2 |
More checks in Microsoft 365 admin center
- Administrative accounts should be cloud-only, not synced from on-premisesCIS 1.1.1
- Two emergency access accounts have been definedCIS 1.1.2
- The number of Global Administrators should be between two and fourCIS 1.1.3
- Administrative accounts should use a license with a reduced application footprintCIS 1.1.4
Go further
- Microsoft 365 admin center15 controls in this section
- CIS Microsoft 365 Foundations v7.0.0160 controls
- CIS Microsoft 365 Foundations checklistEvery control in one list, as CSV
- RemediationSee what a fix changes in your tenant before you apply it, then use the generated script
- Monitoring & DriftDaily scans, drift detection and email alerts when a control regresses
Check this on your Microsoft 365
ConfigCobra runs this check with every other control of the CIS Microsoft 365 Foundations Benchmark, read-only.