File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Entrypoints/HTTP Functions/Identity/Administration/Groups Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,15 @@ function Invoke-AddGroup {
6262 PrimarySmtpAddress = $Email
6363 }
6464 $GraphRequest = New-ExoRequest - tenantid $tenant - cmdlet ' New-DynamicDistributionGroup' - cmdParams $ExoParams
65+
66+ if (! $GroupObject.allowExternal ) {
67+ $SetParams = @ {
68+ RequireSenderAuthenticationEnabled = [bool ]! $GroupObject.allowExternal
69+ Name = $GroupObject.displayName
70+ PrimarySmtpAddress = $Email
71+ }
72+ $GraphRequest = New-ExoRequest - tenantid $tenant - cmdlet ' Set-DynamicDistributionGroup' - cmdParams $SetParams
73+ }
6574 } else {
6675 $ExoParams = @ {
6776 Name = $GroupObject.displayName
Original file line number Diff line number Diff line change @@ -75,6 +75,15 @@ function Invoke-CIPPStandardGroupTemplate {
7575 PrimarySmtpAddress = $email
7676 }
7777 $GraphRequest = New-ExoRequest - tenantid $tenant - cmdlet ' New-DynamicDistributionGroup' - cmdParams $params
78+
79+ if (! $groupobj.AllowExternal ) {
80+ $SetParams = @ {
81+ RequireSenderAuthenticationEnabled = [bool ]! $groupobj.AllowExternal
82+ Name = $groupobj.Displayname
83+ PrimarySmtpAddress = $email
84+ }
85+ $GraphRequest = New-ExoRequest - tenantid $tenant - cmdlet ' Set-DynamicDistributionGroup' - cmdParams $SetParams
86+ }
7887 } else {
7988 $Params = @ {
8089 Name = $groupobj.Displayname
You can’t perform that action at this time.
0 commit comments