Skip to content

Commit 033187e

Browse files
Merge pull request #3809 from microsoft/Dev
Release 1.23.1018.1
2 parents 7853dc4 + b6231fa commit 033187e

File tree

142 files changed

+2988
-429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+2988
-429
lines changed

CHANGELOG.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Change log for Microsoft365DSC
22

3+
# 1.23.1018.1
4+
5+
* AADAuthenticationMethodPolicyAuthenticator
6+
* Fixes an issue with the Get method when an assigned group
7+
was deleted.
8+
* AADConditionalAccessPolicy
9+
* Added support for the SigninFrequencyInterval parameter.
10+
* EXODistributionGroup
11+
* Changes the export logic to use PrimarySMTPAddress if provided.
12+
* IntuneAntivirusPolicyWindows10SettingCatalog
13+
* Added "-All" parameter to retrieve all settings from a template.
14+
FIXES [#3722](https://github.com/microsoft/Microsoft365DSC/issues/3722)
15+
* TeamsGroupPolicyAssignment
16+
* Fixes the export of CsGroup, when the display name of a group is included in
17+
another display name.
18+
FIXES [#3736](https://github.com/microsoft/Microsoft365DSC/issues/3736)
19+
* TeamsUserPolicyAssignment
20+
* Initial release.
21+
FIXES [#3777](https://github.com/microsoft/Microsoft365DSC/issues/3777)
22+
* MISC
23+
* Fixes fancy quotes in complex objects for extraction.
24+
325
# 1.23.1011.1
426

527
* AADRoleEligibilityScheduleRequest
@@ -9,6 +31,8 @@
931
* Added support for retrieved groups as calendar delegates.
1032
* EXODistributionGroup
1133
* Fixes the export of group membership to use Identity.
34+
* IntuneDeviceConfigurationPolicyWindows10
35+
* Support setting assignment groups by display name
1236
* TeamsUpdateManagementPolicy
1337
* Add support for the new acceptable value for UseNewTeamsClient
1438
(NewTeamsAsDefault).
@@ -28,7 +52,7 @@
2852
were not managed correctly.
2953
FIXES [#3639](https://github.com/microsoft/Microsoft365DSC/issues/3639)
3054
* AADEntitlementManagementConnectedOrganization
31-
* Fixed [[#3738](https://github.com/microsoft/Microsoft365DSC/issues/3738)]
55+
* FIXES [[#3738](https://github.com/microsoft/Microsoft365DSC/issues/3738)]
3256
* EXOCalendarProcessing
3357
* Initial release.
3458
* EXODistributionGroup

Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicy/MSFT_AADAuthenticationMethodPolicy.schema.mof

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ class MSFT_AADAuthenticationMethodPolicyIncludeTarget
2424
[Write, Description("The kind of entity targeted. Possible values are: user, group."), ValueMap{"user","group","unknownFutureValue"}, Values{"user","group","unknownFutureValue"}] String TargetType;
2525
};
2626
[ClassVersion("1.0.0")]
27+
class MSFT_MicrosoftGraphExcludeTarget
28+
{
29+
[Write, Description("The object identifier of an Azure AD user or group.")] String Id;
30+
[Write, Description("The type of the authentication method target. Possible values are: user, group, unknownFutureValue."), ValueMap{"user","group","unknownFutureValue"}, Values{"user","group","unknownFutureValue"}] String TargetType;
31+
};
32+
[ClassVersion("1.0.0")]
2733
class MSFT_MicrosoftGraphAuthenticationMethodsRegistrationCampaignIncludeTarget
2834
{
2935
[Write, Description("The object identifier of an Azure AD user or group.")] String Id;

Modules/Microsoft365DSC/DSCResources/MSFT_AADAuthenticationMethodPolicyAuthenticator/MSFT_AADAuthenticationMethodPolicyAuthenticator.psm1

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,12 @@ function Get-TargetResource
247247
$myExcludeTargets = @{}
248248
if ($currentExcludeTargets.id -ne 'all_users')
249249
{
250-
$myExcludeTargetsDisplayName = Get-MgGroup -GroupId $currentExcludeTargets.id
251-
$myExcludeTargets.Add('Id', $myExcludeTargetsDisplayName.DisplayName)
250+
$myExcludeTargetsDisplayName = Get-MgGroup -GroupId $currentExcludeTargets.id -ErrorAction SilentlyContinue
251+
252+
if ($null -ne $myIncludeTargetsDisplayName)
253+
{
254+
$myExcludeTargets.Add('Id', $myExcludeTargetsDisplayName.DisplayName)
255+
}
252256
}
253257
else
254258
{
@@ -271,8 +275,11 @@ function Get-TargetResource
271275
$myIncludeTargets = @{}
272276
if ($currentIncludeTargets.id -ne 'all_users')
273277
{
274-
$myIncludeTargetsDisplayName = Get-MgGroup -GroupId $currentIncludeTargets.id
275-
$myIncludeTargets.Add('Id', $myIncludeTargetsDisplayName.DisplayName)
278+
$myIncludeTargetsDisplayName = Get-MgGroup -GroupId $currentIncludeTargets.id -ErrorAction SilentlyContinue
279+
if ($null -ne $myIncludeTargetsDisplayName)
280+
{
281+
$myIncludeTargets.Add('Id', $myIncludeTargetsDisplayName.DisplayName)
282+
}
276283
}
277284
else
278285
{

Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.psm1

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ function Get-TargetResource
159159
[System.Boolean]
160160
$SignInFrequencyIsEnabled,
161161

162+
[Parameter()]
163+
[ValidateSet('timeBased', 'everyTime', 'unknownFutureValue')]
164+
[System.String]
165+
$SignInFrequencyInterval,
166+
162167
[Parameter()]
163168
[ValidateSet('Always', 'Never', '')]
164169
[System.String]
@@ -525,10 +530,12 @@ function Get-TargetResource
525530
if ($Policy.SessionControls.SignInFrequency.IsEnabled)
526531
{
527532
$SignInFrequencyType = [System.String]$Policy.SessionControls.SignInFrequency.Type
533+
$SignInFrequencyIntervalValue = [System.String]$Policy.SessionControls.SignInFrequency.FrequencyInterval
528534
}
529535
else
530536
{
531537
$SignInFrequencyType = $null
538+
$SignInFrequencyIntervalValue = $null
532539
}
533540
if ($Policy.SessionControls.PersistentBrowser.IsEnabled)
534541
{
@@ -626,6 +633,7 @@ function Get-TargetResource
626633
SignInFrequencyValue = $Policy.SessionControls.SignInFrequency.Value
627634
#no translation or conversion needed, $null returned if undefined
628635
SignInFrequencyType = [System.String]$Policy.SessionControls.SignInFrequency.Type
636+
SignInFrequencyInterval = $SignInFrequencyIntervalValue
629637
#no translation needed
630638
PersistentBrowserIsEnabled = $false -or $Policy.SessionControls.PersistentBrowser.IsEnabled
631639
#make false if undefined, true if true
@@ -807,6 +815,11 @@ function Set-TargetResource
807815
[System.Boolean]
808816
$SignInFrequencyIsEnabled,
809817

818+
[Parameter()]
819+
[ValidateSet('timeBased', 'everyTime', 'unknownFutureValue')]
820+
[System.String]
821+
$SignInFrequencyInterval,
822+
810823
[Parameter()]
811824
[ValidateSet('Always', 'Never', '')]
812825
[System.String]
@@ -1421,16 +1434,32 @@ function Set-TargetResource
14211434
if ($SignInFrequencyIsEnabled)
14221435
{
14231436
$SigninFrequencyProp = @{
1424-
IsEnabled = $true
1425-
Type = $null
1426-
Value = $null
1437+
isEnabled = $true
1438+
type = $null
1439+
value = $null
1440+
frequencyInterval = $null
14271441
}
14281442

14291443
$sessioncontrols.Add('SignInFrequency', $SigninFrequencyProp)
14301444
#create and provision SignInFrequency object if used
1431-
$sessioncontrols.SignInFrequency.IsEnabled = $true
1432-
$sessioncontrols.SignInFrequency.Type = $SignInFrequencyType
1433-
$sessioncontrols.SignInFrequency.Value = $SignInFrequencyValue
1445+
$sessioncontrols.SignInFrequency.isEnabled = $true
1446+
if ($SignInFrequencyType -ne '')
1447+
{
1448+
$sessioncontrols.SignInFrequency.type = $SignInFrequencyType
1449+
}
1450+
else
1451+
{
1452+
$sessioncontrols.SignInFrequency.Remove("type") | Out-Null
1453+
}
1454+
if ($SignInFrequencyValue -gt 0)
1455+
{
1456+
$sessioncontrols.SignInFrequency.value = $SignInFrequencyValue
1457+
}
1458+
else
1459+
{
1460+
$sessioncontrols.SignInFrequency.Remove("value") | Out-Null
1461+
}
1462+
$sessioncontrols.SignInFrequency.frequencyInterval = $SignInFrequencyInterval
14341463
}
14351464
if ($PersistentBrowserIsEnabled)
14361465
{
@@ -1670,6 +1699,11 @@ function Test-TargetResource
16701699
[System.Boolean]
16711700
$SignInFrequencyIsEnabled,
16721701

1702+
[Parameter()]
1703+
[ValidateSet('timeBased', 'everyTime', 'unknownFutureValue')]
1704+
[System.String]
1705+
$SignInFrequencyInterval,
1706+
16731707
[Parameter()]
16741708
[ValidateSet('Always', 'Never', '')]
16751709
[System.String]

Modules/Microsoft365DSC/DSCResources/MSFT_AADConditionalAccessPolicy/MSFT_AADConditionalAccessPolicy.schema.mof

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class MSFT_AADConditionalAccessPolicy : OMI_BaseResource
2323
[Write, Description("Client Device Platforms out of scope of the Policy.")] String ExcludePlatforms[];
2424
[Write, Description("AAD Named Locations in scope of the Policy.")] String IncludeLocations[];
2525
[Write, Description("AAD Named Locations out of scope of the Policy.")] String ExcludeLocations[];
26-
[Write, Description("Client Device Filter mode of the Policy."), ValueMap{"include","exclude"}, Values{"include","exclude"}] String DeviceFilterMode;
26+
[Write, Description("Client Device Filter mode of the Policy."), ValueMap{"include","exclude"}, Values{"include","exclude"}] String DeviceFilterMode;
2727
[Write, Description("Client Device Filter rule of the Policy.")] String DeviceFilterRule;
2828
[Write, Description("AAD Identity Protection User Risk Levels in scope of the Policy.")] String UserRiskLevels[];
2929
[Write, Description("AAD Identity Protection Sign-in Risk Levels in scope of the Policy.")] String SignInRiskLevels[];
@@ -38,6 +38,7 @@ class MSFT_AADConditionalAccessPolicy : OMI_BaseResource
3838
[Write, Description("Custom Controls assigned to the grant property of this policy.")] String CustomAuthenticationFactors[];
3939
[Write, Description("Sign in frequency unit (days/hours) to be interpreted by the policy."), ValueMap{"Days","Hours",""}, Values{"Days","Hours",""}] String SignInFrequencyType;
4040
[Write, Description("Specifies, whether sign-in frequency is enforced by the Policy.")] Boolean SignInFrequencyIsEnabled;
41+
[Write, Description("Sign in frequency interval. Possible values are: timeBased, everyTime and unknownFutureValue."), ValueMap{"timeBased","everyTime","unknownFutureValue"}, Values{"timeBased","everyTime","unknownFutureValue"}] String SignInFrequencyInterval;
4142
[Write, Description("Specifies, whether Browser Persistence is controlled by the Policy.")] Boolean PersistentBrowserIsEnabled;
4243
[Write, Description("Specifies, what Browser Persistence control is enforced by the Policy."), ValueMap{"Always","Never",""}, Values{"Always","Never",""}] String PersistentBrowserMode;
4344
[Write, Description("Name of the associated authentication strength policy.")] String AuthenticationStrength;

Modules/Microsoft365DSC/DSCResources/MSFT_EXODistributionGroup/MSFT_EXODistributionGroup.psm1

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,13 +247,37 @@ function Get-TargetResource
247247
{
248248
if ($null -ne $Script:exportedInstances -and $Script:ExportMode)
249249
{
250-
$distributionGroup = $Script:exportedInstances | Where-Object -FilterScript {$_.Identity -eq $Identity}
251-
$distributionGroupMembers = Get-DistributionGroupMember -Identity $Identity -ErrorAction Stop -ResultSize Unlimited
250+
if ($null -ne $PrimarySmtpAddress)
251+
{
252+
$distributionGroup = $Script:exportedInstances | Where-Object -FilterScript {$_.PrimarySmtpAddress -eq $PrimarySmtpAddress}
253+
$distributionGroupMembers = Get-DistributionGroupMember -Identity $PrimarySmtpAddress `
254+
-ErrorAction 'Stop' `
255+
-ResultSize 'Unlimited'
256+
}
257+
else
258+
{
259+
$distributionGroup = $Script:exportedInstances | Where-Object -FilterScript {$_.Identity -eq $Identity}
260+
$distributionGroupMembers = Get-DistributionGroupMember -Identity $Identity `
261+
-ErrorAction 'Stop' `
262+
-ResultSize 'Unlimited'
263+
}
252264
}
253265
else
254266
{
255-
$distributionGroup = Get-DistributionGroup -Identity $Identity -ErrorAction Stop
256-
$distributionGroupMembers = Get-DistributionGroupMember -Identity $Identity -ErrorAction Stop -ResultSize Unlimited
267+
if ($null -ne $PrimarySmtpAddress)
268+
{
269+
$distributionGroup = Get-DistributionGroup -Identity $PrimarySmtpAddress -ErrorAction Stop
270+
$distributionGroupMembers = Get-DistributionGroupMember -Identity $PrimarySmtpAddress `
271+
-ErrorAction 'Stop' `
272+
-ResultSize 'Unlimited'
273+
}
274+
else
275+
{
276+
$distributionGroup = Get-DistributionGroup -Identity $Identity -ErrorAction Stop
277+
$distributionGroupMembers = Get-DistributionGroupMember -Identity $Identity `
278+
-ErrorAction 'Stop' `
279+
-ResultSize 'Unlimited'
280+
}
257281
}
258282

259283
if ($null -eq $distributionGroup)
@@ -645,6 +669,7 @@ function Set-TargetResource
645669
}
646670
$currentParameters.Remove('OrganizationalUnit') | Out-Null
647671
$currentParameters.Remove('Type') | Out-Null
672+
$currentParameters.Remove('Members') | Out-Null
648673

649674
if ($EmailAddresses.Length -gt 0)
650675
{
@@ -661,7 +686,7 @@ function Set-TargetResource
661686
{
662687
$currentParameters.Identity = $newGroup.Identity
663688
}
664-
Set-DistributionGroup @currentParameters
689+
Set-DistributionGroup @currentParameters -BypassSecurityGroupManagerCheck
665690
}
666691
}
667692

@@ -984,6 +1009,7 @@ function Export-TargetResource
9841009
Write-Host " |---[$i/$($Script:exportedInstances.Count)] $($distributionGroup.Identity)" -NoNewline
9851010
$params = @{
9861011
Identity = $distributionGroup.Identity
1012+
PrimarySmtpAddress = $distributionGroup.PrimarySmtpAddress
9871013
Name = $distributionGroup.Name
9881014
Credential = $Credential
9891015
ApplicationId = $ApplicationId

Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAntivirusPolicyWindows10SettingCatalog/MSFT_IntuneAntivirusPolicyWindows10SettingCatalog.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1795,7 +1795,7 @@ function Format-M365DSCIntuneSettingCatalogPolicySettings
17951795

17961796
$settings = @()
17971797

1798-
$templateSettings = Get-MgBetaDeviceManagementConfigurationPolicyTemplateSettingTemplate -DeviceManagementConfigurationPolicyTemplateId $templateReferenceId
1798+
$templateSettings = Get-MgBetaDeviceManagementConfigurationPolicyTemplateSettingTemplate -DeviceManagementConfigurationPolicyTemplateId $templateReferenceId -All
17991799

18001800
#write-verbose -Message ( $DSCParams|out-string)
18011801

Modules/Microsoft365DSC/DSCResources/MSFT_IntuneAppConfigurationPolicy/MSFT_IntuneAppConfigurationPolicy.schema.mof

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
[ClassVersion("1.0.0.0")]
22
class MSFT_DeviceManagementConfigurationPolicyAssignments
33
{
4-
[Write, Description("The type of the target assignment."), ValueMap{"#microsoft.graph.groupAssignmentTarget","#microsoft.graph.allLicensedUsersAssignmentTarget","#microsoft.graph.allDevicesAssignmentTarget","#microsoft.graph.exclusionGroupAssignmentTarget","#microsoft.graph.configurationManagerCollectionAssignmentTarget"}, Values{"#microsoft.graph.groupAssignmentTarget","#microsoft.graph.allLicensedUsersAssignmentTarget","#microsoft.graph.allDevicesAssignmentTarget","#microsoft.graph.exclusionGroupAssignmentTarget","#microsoft.graph.configurationManagerCollectionAssignmentTarget"}] String dataType;
5-
[Write, Description("The type of filter of the target assignment i.e. Exclude or Include. Possible values are:none, include, exclude."), ValueMap{"none","include","exclude"}, Values{"none","include","exclude"}] String deviceAndAppManagementAssignmentFilterType;
6-
[Write, Description("The Id of the filter for the target assignment.")] String deviceAndAppManagementAssignmentFilterId;
7-
[Write, Description("The group Id that is the target of the assignment.")] String groupId;
8-
[Write, Description("The collection Id that is the target of the assignment.(ConfigMgr)")] String collectionId;
4+
[Write, Description("The type of the target assignment."), ValueMap{"#microsoft.graph.groupAssignmentTarget","#microsoft.graph.allLicensedUsersAssignmentTarget","#microsoft.graph.allDevicesAssignmentTarget","#microsoft.graph.exclusionGroupAssignmentTarget","#microsoft.graph.configurationManagerCollectionAssignmentTarget"}, Values{"#microsoft.graph.groupAssignmentTarget","#microsoft.graph.allLicensedUsersAssignmentTarget","#microsoft.graph.allDevicesAssignmentTarget","#microsoft.graph.exclusionGroupAssignmentTarget","#microsoft.graph.configurationManagerCollectionAssignmentTarget"}] String dataType;
5+
[Write, Description("The type of filter of the target assignment i.e. Exclude or Include. Possible values are:none, include, exclude."), ValueMap{"none","include","exclude"}, Values{"none","include","exclude"}] String deviceAndAppManagementAssignmentFilterType;
6+
[Write, Description("The Id of the filter for the target assignment.")] String deviceAndAppManagementAssignmentFilterId;
7+
[Write, Description("The group Id that is the target of the assignment.")] String groupId;
8+
[Write, Description("The group Display Name that is the target of the assignment.")] String groupDisplayName;
9+
[Write, Description("The collection Id that is the target of the assignment.(ConfigMgr)")] String collectionId;
910
};
1011

1112
[ClassVersion("1.0.0")]

0 commit comments

Comments
 (0)