You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/active-directory/hybrid/how-to-connect-modify-group-writeback.md
+31-9Lines changed: 31 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,16 +33,38 @@ If the original version of group writeback is already enabled and in use in your
33
33
To configure directory settings to disable automatic writeback of newly created Microsoft 365 groups, use one of these methods:
34
34
35
35
- Azure portal: Update the `NewUnifiedGroupWritebackDefault` setting to `false`.
36
-
- PowerShell: Use the [New-AzureADDirectorySetting](../enterprise-users/groups-settings-cmdlets.md) cmdlet. For example:
36
+
- PowerShell: Use the [Microsoft Graph PowerShell SDK](/powershell/microsoftgraph/installation?view=graph-powershell-1.0&preserve-view=true). For example:
37
37
38
38
```PowerShell
39
-
$TemplateId = (Get-AzureADDirectorySettingTemplate | where {$_.DisplayName -eq "Group.Unified" }).Id
40
-
$Template = Get-AzureADDirectorySettingTemplate | where -Property Id -Value $TemplateId -EQ
# Create a directory setting using the Template values hashtable including the updated value
56
+
$params = @{}
57
+
$params.Add("TemplateId", $Template.Id)
58
+
$params.Add("Values", @())
59
+
$TemplateValues.Keys | ForEach-Object {
60
+
$params.Values += @(@{Name = $_; Value = $TemplateValues[$_]})
61
+
}
62
+
New-MgDirectorySetting -BodyParameter $params
44
63
```
45
64
65
+
> [!NOTE]
66
+
> We recommend using Microsoft Graph PowerShell SDK with [Windows PowerShell 7](/powershell/scripting/whats-new/migrating-from-windows-powershell-51-to-powershell-7?view=powershell-7.3&preserve-view=true).
67
+
46
68
- Microsoft Graph: Use the [directorySetting](/graph/api/resources/directorysetting?view=graph-rest-beta&preserve-view=true) resource type.
47
69
48
70
### Disable writeback for all existing Microsoft 365 group
@@ -56,7 +78,7 @@ To disable writeback of all Microsoft 365 groups that were created before these
56
78
#Import-module
57
79
Import-module Microsoft.Graph
58
80
59
-
#Connect to MgGraph and select the Beta API Version
81
+
#Connect to MgGraph with necessary scope and select the Beta API Version
60
82
Connect-MgGraph -Scopes Group.ReadWrite.All
61
83
Select-MgProfile -Name beta
62
84
@@ -68,8 +90,8 @@ To disable writeback of all Microsoft 365 groups that were created before these
> We recomend using Microsoft Graph PowerShell SDK with [Windows PowerShell 7](/powershell/scripting/whats-new/migrating-from-windows-powershell-51-to-powershell-7?view=powershell-7.3&preserve-view=true)
72
-
93
+
```
94
+
73
95
- Microsoft Graph Explorer: Use a [group object](/graph/api/group-update?tabs=http&view=graph-rest-beta&preserve-view=true).
74
96
75
97
## Delete groups when they're disabled for writeback or soft deleted
0 commit comments