Skip to content

Commit

Permalink
Merge branch 'Dev' into fix/TeamsComplianceRecordingPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
sandrola committed Mar 28, 2024
2 parents 5f4763b + 0c3c087 commit d719425
Show file tree
Hide file tree
Showing 156 changed files with 1,357 additions and 566 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/ProblemWithResource.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ body:
label: "Which workloads are affected"
description: The workload of the resource you are having an issue with.
options:
- "Azure Active Directory"
- "Azure Active Directory (Entra ID)"
- "Exchange Online"
- "Intune"
- "Office 365 Admin"
- "OneDrive for Business"
- "Planner"
Expand Down
38 changes: 35 additions & 3 deletions .github/workflows/Global - Integration - AAD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ jobs:
{
throw $_
}
- name: Validating {Create} Integration Tests
shell: powershell
run: |
try
{
$Result = Test-DSCConfiguration -Detailed -Verbose -ErrorAction Stop
Expand All @@ -88,6 +90,15 @@ jobs:
{
Write-Host "All resources in the Tenant are in the Desired State"
}
try
{
$Result = Get-DSCConfiguration -Verbose -ErrorAction Stop
}
catch
{
throw $_
}
- name: Generate {Update} Integration Tests from Examples
shell: powershell
run: |
Expand Down Expand Up @@ -120,7 +131,9 @@ jobs:
{
throw $_
}
- name: Validating {Update} Integration Tests
shell: powershell
run: |
try
{
$Result = Test-DSCConfiguration -Detailed -Verbose -ErrorAction Stop
Expand All @@ -146,6 +159,15 @@ jobs:
{
Write-Host "All resources in the Tenant are in the Desired State"
}
try
{
$Result = Get-DSCConfiguration -Verbose -ErrorAction Stop
}
catch
{
throw $_
}
- name: Generate {Remove} Integration Tests from Examples
shell: powershell
run: |
Expand Down Expand Up @@ -178,7 +200,9 @@ jobs:
{
throw $_
}
- name: Validating {Remove} Integration Tests
shell: powershell
run: |
try
{
$Result = Test-DSCConfiguration -Detailed -Verbose -ErrorAction Stop
Expand All @@ -205,3 +229,11 @@ jobs:
Write-Host "All resources in the Tenant are in the Desired State"
}
try
{
$Result = Get-DSCConfiguration -Verbose -ErrorAction Stop
}
catch
{
throw $_
}
57 changes: 54 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,51 @@
# Change log for Microsoft365DSC

# UNRELEASED
* TeamsComplianceRecordingPolicy
* FIXES [[#3712](https://github.com/microsoft/Microsoft365DSC/issues/3712)]

* AADAdministrativeUnit
* Fix issue with deploying/creating a new AU with members and/or adding members to an existing AU
FIXES [#4404](https://github.com/microsoft/Microsoft365DSC/issues/4404)
* Updated examples to include setting Visibility and ScopedRoleMembers
* All resources
* Fix issue where Ensure cannot be left as default 'Present'
* AADAdministrativeUnit
* Fix issue with omitted Ensure and/or Id
FIXES [#4437](https://github.com/microsoft/Microsoft365DSC/issues/4437)
* AADConditionalAccessPolicy
* Fixed schema file
* EXOCalendarProcessing
* Fixed schema file
* EXOGroupSettings
* Fixed schema file
* EXOMailTips
* Replaced the Organization parameter with IsSingleInstance (BREAKING)
FIXES [#4117](https://github.com/microsoft/Microsoft365DSC/issues/4117)
* EXOMessageClassification
* Fixed schema file
* EXOOMEConfiguration
* Fixed schema file
* EXOTransportRule
* Change data type of Priority from String to Int (BREAKING)
FIXES [[#4136](https://github.com/microsoft/Microsoft365DSC/issues/4136)]
* IntuneAppConfigurationPolicy
* Fix comparison in Test-TargetResource
FIXES [#4451](https://github.com/microsoft/Microsoft365DSC/issues/4451)
* IntuneDeviceCompliancePolicyWindows10
* Fix group assignment by using the corrected function
Update-DeviceConfigurationPolicyAssignment from module M365DSCDRGUtil
FIXES [#4467](https://github.com/microsoft/Microsoft365DSC/issues/4467)
* IntuneDeviceEnrollmentStatusPageWindows10
* Added support for specifying SelectedMobileAppNames in addition to SelectedMobileAppIds,
which are different for each tenant.
FIXES [#4494](https://github.com/microsoft/Microsoft365DSC/issues/4494)
* M365DSCRuleEvaluation
* Log both matching and not matching resources and in XML format
* O365OrgSettings
* Fixed missing permissions in settings.json
* TeamsChannelTab
* Fixed schema file
* TeamsComplianceRecordingPolicy
* FIXES [[#3712](https://github.com/microsoft/Microsoft365DSC/issues/3712)]
* TeamsGroupPolicyAssignment
* Skip assignments that have orphaned/deleted groups or without display name
instead of throwing an error
Expand All @@ -15,9 +55,17 @@
FIXES [#4428](https://github.com/microsoft/Microsoft365DSC/issues/4428)
* Fix creation, update and deletion of resource
* DEPENDENCIES
* Updated DSCParser to version 2.0.0.0.
* Updated DSCParser to version 2.0.0.2.
* MISC
* Initial release of Get-M365DSCEvaluationRulesForConfiguration
* M365DSCDRGUtil
Fix Update-DeviceConfigurationPolicyAssignment so that if the group cannot
be found by its Id it tries to search it by display name
FIXES [#4467](https://github.com/microsoft/Microsoft365DSC/issues/4467)
* M365DSCReport
Fix issue when asserting TeamsGroupPolicyAssignment configurations by
returning its both mandatory parameters in Get-M365DSCResourceKey
* Fix broken links to integration tests in README.md

# 1.24.313.1

Expand Down Expand Up @@ -123,6 +171,9 @@
* Add read permission for extracting M365 apps installation settings instead
of extracting them only with read/write permissions
FIXES [#4418](https://github.com/microsoft/Microsoft365DSC/issues/4418)
* TeamsTeam
* Add error handling for teams without displayname during export
FIXES [#4406](https://github.com/microsoft/Microsoft365DSC/issues/4406)
* TeamsVoiceRoute
* Fix policy removal and also comparison in Test-TargetResource
* DEPENDENCIES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,6 @@ function Get-TargetResource
$nullResult.Ensure = 'Absent'
try
{
$getValue = $null

#region resource generator code
if (-Not [string]::IsNullOrEmpty($Id))
{
$getValue = Get-MgBetaDirectoryAdministrativeUnit -AdministrativeUnitId $Id -ErrorAction Stop
}

if (-not $getValue -and -Not [string]::IsNullOrEmpty($DisplayName))
{
$getValue = Get-MgBetaDirectoryAdministrativeUnit -Filter "DisplayName eq '$DisplayName'" -ErrorAction Stop
}
#endregion

$nullResult = $PSBoundParameters
$nullResult.Ensure = 'Absent'

$getValue = $null
#region resource generator code
Expand Down Expand Up @@ -388,7 +372,6 @@ function Set-TargetResource
$PSBoundParameters.Remove('TenantId') | Out-Null
$PSBoundParameters.Remove('CertificateThumbprint') | Out-Null
$PSBoundParameters.Remove('ManagedIdentity') | Out-Null
$PSBoundParameters.Remove('Verbose') | Out-Null

$backCurrentMembers = $currentInstance.Members
$backCurrentScopedRoleMembers = $currentInstance.ScopedRoleMembers
Expand Down Expand Up @@ -565,8 +548,8 @@ function Set-TargetResource
foreach ($member in $memberSpecification)
{
Write-Verbose -Message "Adding new dynamic member {$($member.Id)}"
$url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/$($member.Type)/$($member.Id)"
$memberBodyParam = @{
$url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "v1.0/$($member.Type)/$($member.Id)"
'@odata.id' = $url
}

Expand Down Expand Up @@ -663,8 +646,8 @@ function Set-TargetResource
{
Write-Verbose -Message "AdministrativeUnit {$DisplayName} Adding member {$($diff.Identity)}, type {$($diff.Type)}"

$url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "beta/$memberType/$($memberObject.Id)"
$memberBodyParam = @{
$url = $Global:MSCloudLoginConnectionProfile.MicrosoftGraph.ResourceUrl + "v1.0/$memberType/$($memberObject.Id)"
'@odata.id' = $url
}
New-MgBetaDirectoryAdministrativeUnitMemberByRef -AdministrativeUnitId ($currentInstance.Id) -BodyParameter $memberBodyParam | Out-Null
Expand Down Expand Up @@ -895,7 +878,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false - Ensure not the same"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function Get-TargetResource

$nullReturn = $PSBoundParameters
$nullReturn.Ensure = 'Absent'
$AADApp = $null
try
{
try
Expand Down Expand Up @@ -212,7 +213,7 @@ function Get-TargetResource
TenantId = $TenantId
ApplicationSecret = $ApplicationSecret
CertificateThumbprint = $CertificateThumbprint
Managedidentity = $ManagedIdentity.IsPresent
ManagedIdentity = $ManagedIdentity.IsPresent
}
Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)"
return $result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()
$ValuesToCheck.Remove('Id') | Out-Null
if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MSFT_AADConditionalAccessPolicy : OMI_BaseResource
[Write, Description("Custom Controls assigned to the grant property of this policy.")] String CustomAuthenticationFactors[];
[Write, Description("Sign in frequency unit (days/hours) to be interpreted by the policy."), ValueMap{"Days","Hours",""}, Values{"Days","Hours",""}] String SignInFrequencyType;
[Write, Description("Specifies, whether sign-in frequency is enforced by the Policy.")] Boolean SignInFrequencyIsEnabled;
[Write, Description("Sign in frequency interval. Possible values are: timeBased, everyTime and unknownFutureValue."), ValueMap{"timeBased","everyTime","unknownFutureValue"}, Values{"timeBased","everyTime","unknownFutureValue"}] String SignInFrequencyInterval;
[Write, Description("Sign in frequency interval. Possible values are: timeBased, everyTime and unknownFutureValue."), ValueMap{"timeBased","everyTime","unknownFutureValue"}, Values{"timeBased","everyTime","unknownFutureValue"}] String SignInFrequencyInterval;
[Write, Description("Specifies, whether Browser Persistence is controlled by the Policy.")] Boolean PersistentBrowserIsEnabled;
[Write, Description("Specifies, what Browser Persistence control is enforced by the Policy."), ValueMap{"Always","Never",""}, Values{"Always","Never",""}] String PersistentBrowserMode;
[Write, Description("Name of the associated authentication strength policy.")] String AuthenticationStrength;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"resourceName": "AADAuthenticationMethodPolicyConfigurationDefault",
"resourceName": "AADCrossTenantAccessPolicyConfigurationDefault",
"description": "This resource configures an Azure AD Authentication Method Policy Configuration Default.",
"roles": {
"read": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"resourceName": "AADAuthenticationMethodPolicyConfigurationPartner",
"resourceName": "AADCrossTenantAccessPolicyConfigurationPartner",
"description": "This resource configures an Azure AD Authentication Method Policy Configuration Partner.",
"roles": {
"read": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ function Test-TargetResource
$CurrentValues = Get-TargetResource @PSBoundParameters
$ValuesToCheck = ([Hashtable]$PSBoundParameters).clone()

if ($CurrentValues.Ensure -ne $PSBoundParameters.Ensure)
if ($CurrentValues.Ensure -ne $Ensure)
{
Write-Verbose -Message "Test-TargetResource returned $false"
return $false
Expand Down
Loading

0 comments on commit d719425

Please sign in to comment.