Restrict or allow Microsoft Teams group creation for Office 365 users | PowerShell

Опубликовано: 27 Май 2024
на канале: ITeePK
718
8

In this tutorial video, learn how to control user permissions within Microsoft Office 365 and Microsoft Teams effectively. Follow along as we demonstrate how to allow only a specific group of users to create Office 365 accounts and Teams, while restricting access for other users. Using PowerShell and the Office 365 Admin portal, we navigate through the process meticulously, ensuring a clear understanding of each step.

Watch as we verify the settings to confirm the user restrictions are in place as intended. Additionally, discover how to revert these settings back to their original state with ease. Whether you're new to user management in Office 365 or seeking a refresher, this comprehensive guide provides valuable insights and practical knowledge to streamline user permission control within your organization.


Setup Power Shell Azure module:

Install-Module AzureADPreview


Check Status Command:

(Get-AzureADDirectorySetting -Id $settingsObjectID).Values


Script to allow the group of users who can create Teams & Microsoft Office 365 Group.

$GroupName = "AllowedToCreateGroups"
$AllowGroupCreation = "False"

Connect-AzureAD

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

$settingsCopy = Get-AzureADDirectorySetting -Id $settingsObjectID
$settingsCopy["EnableGroupCreation"] = $AllowGroupCreation

if($GroupName)
{
$settingsCopy["GroupCreationAllowedGroupId"] = (Get-AzureADGroup -SearchString $GroupName).objectid
}

Set-AzureADDirectorySetting -Id $settingsObjectID -DirectorySetting $settingsCopy

(Get-AzureADDirectorySetting -Id $settingsObjectID).Values


Related Video: Manage Guest Access in Microsoft Teams:    • How to Manage Teams guest access from...  
#teams #microsoft #office365 #powershell #microsoft365 group


Смотрите видео Restrict or allow Microsoft Teams group creation for Office 365 users | PowerShell онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь ITeePK 27 Май 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 718 раз и оно понравилось 8 людям.