How to solve the issue of guest users access in Office 365 when you applied restriction on office 365 groups creation tenant wide?

How to solve the issue of guest users access in Office 365 when you applied  restriction on office 365 groups creation tenant wide?

  1. Connect-AzureAD via powerShell
  2. Run the following command:
  3. $template = Get-AzureADDirectorySettingTemplate | ? {$_.displayname -eq “group.unified”}
  4. See if you already have an AzureADDirectorySetting object, and if so save the Object ID. Run this command:
  5. $settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value “Group.Unified” -EQ).id
  6. $template = Get-AzureADDirectorySettingTemplate | ? {$_.displayname -eq “group.unified”}
  7. $settingsCopy = $template.CreateDirectorySetting()
  8. New-AzureADDirectorySetting -DirectorySetting $settingsCopy
  9. $settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value “Group.Unified” -EQ).id
  10. Copy the AzureADDirectorySetting object back into the local $settingsCopy variable:
  11. $settingsCopy = Get-AzureADDirectorySetting –Id $settingsObjectID
  12. This is only a COPY of the settings; changes won’t take effect until you copy it BACK to the AzureADDirectorySetting object.
  13. Set the option to allow | block (True or False) guests to access O365 groups:
  14. $settingsCopy[“AllowGuestsToAccessGroups”] = “true”

To verify the change took effect, retrieve the value from the AzureADDirectorySetting object (don’t just look at the local copy in $settingsCopy):

  1. (Get-AzureADDirectorySetting –Id $settingsObjectID).Values

Recent Articles

How to configure restriction for Users from creation of Office 365 groups, Plans & Microsoft teams.

Connect-AzureAD Create new Security Group "AllowedtoCreateGroups" Get-AzureADGroup -SearchString "AllowedtoCreateGroups" $GroupName = "<SecurityGroupName>" $AllowGroupCreation = "False" Connect-AzureAD $settingsObjectID = (Get-AzureADDirectorySetting | Where-object -Property Displayname -Value "Group.Unified" -EQ).id if(!$settingsObjectID) { $template = Get-AzureADDirectorySettingTemplate | Where-object...

Attack Simulator for Office 365

Microsoft has released Attack Simulator (currently in Preview) to allow Office 365 Global Administrators to simulate phishing campaigns and other attack simulations. Prerequisites ·       Your organization’s email...

What is Advanced Threat Analytics?

Advanced Threat Analytics (ATA) is an on-premises platform that helps protect your enterprise from multiple types of advanced targeted cyber-attacks and insider threats. How ATA...

How to remove Office 365 Groups permanently ?

  Hi Guys, Here is process how to remove office 365 groups or soft deleted groups from your office 365 tenant. Step-1 you need to connect with Azure...

How to solve the issue of guest users access in Office 365 when you applied restriction on office 365 groups creation tenant wide?

Connect-AzureAD via powerShell Run the following command: $template = Get-AzureADDirectorySettingTemplate | ? {$_.displayname -eq "group.unified"} See if you already have an AzureADDirectorySetting object,...

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox