How to prevent users from creating groups in Office 365 | #powershell

preview_player
Показать описание
Hi Everyone,
This video will show how to prevent or limit users from creating groups in Office 365. By default, all users can create Microsoft 365 groups.
When you limit who can create a group, it affects all services that rely on groups for access, including:
Outlook
SharePoint
Yammer
MS TEAMS
MS STREAM
Planner
Power BI ( Classic)
Project for the Web/Roadmap

Other roles can create Microsoft 365 Groups via limited means, listed below.

Exchange Administrator: Exchange admin center, Azure AD
Partner Tier 1 Support: Microsoft 365 admin center, Exchange admin center, Azure AD
Partner Tier 2 Support: Microsoft 365 admin center, Exchange admin center, Azure AD
Directory Writers: Azure AD
SharePoint Administrator: SharePoint admin center, Azure AD
Teams Service Administrator: Teams admin center, Azure AD
User Administrator: Microsoft 365 admin center, Azure AD
If you're a member of one of these roles, you can create Microsoft 365 Groups for restricted users and then assign the user as the owner of the group.

Licensing requirements

To manage who creates groups, the following people need Azure AD Premium licenses or Azure AD Basic EDU licenses assigned to them:

The admin who configures these group creation settings
The members of the group who are allowed to create groups

The following people don't need Azure AD Premium or Azure AD Basic EDU licenses assigned to them.

People who are members of Microsoft 365 groups and who don't have the ability to create other groups.

#office365 #powershell #microsoft #howto
Рекомендации по теме
Комментарии
Автор

PowerShell Command

$GroupName = "<GroupName>"
$AllowGroupCreation = $False

Connect-AzureAD

$settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ).id
if(!$settingsObjectID)
{
$template = | Where-object {$_.displayname -eq "group.unified"}
$settingsCopy =
New-AzureADDirectorySetting -DirectorySetting $settingsCopy
$settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ).id
}

$settingsCopy = Get-AzureADDirectorySetting -Id $settingsObjectID
= $AllowGroupCreation

if($GroupName)
{
= (Get-AzureADGroup -SearchString $GroupName).objectid
} else {
= $GroupName
}
Set-AzureADDirectorySetting -Id $settingsObjectID -DirectorySetting $settingsCopy

(Get-AzureADDirectorySetting -Id $settingsObjectID).Values

TechTripChannel
Автор

Great tutorial. Just tested it out. This also works with an unlicensed global admin account (no M365 license or Entra P1). Of course one should not do it because it's licensing fraud.

frankwalker
Автор

PERFECT VIDEO! don´t have to say more - helped me after looking for hours

digitalisierung
Автор

Great video!

Im after a way to restrict users to create new Team groups, but i still want them to be able to create groups in other apps like planner.
There should be a script or setting i would be able to change.

Do you perhaps know what changes i need to do?
Thank you in advance.

iSlooshie