diff --git a/CHANGELOG.md b/CHANGELOG.md index c6d18ba2c5..7b6b08787e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,9 @@ * MISC * Added checks in New-M365DSCConnection to ensure beta MSGraph profile is correctly set when requested FIXES [#2942](https://github.com/microsoft/Microsoft365DSC/issues/2942) + * Added all Certificate related property to the returned values of the Get-TargetResource function + across all Security & Compliance resources. + FIXES [#2989](https://github.com/microsoft/Microsoft365DSC/issues/2989) * DEPENDENCIES * Updated Microsoft.Graph dependencies to version 1.23.0. * Updated Microsoft.PowerApps.Administration.PowerShell to 2.0.156. diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCAuditConfigurationPolicy/MSFT_SCAuditConfigurationPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCAuditConfigurationPolicy/MSFT_SCAuditConfigurationPolicy.psm1 index ca1cf7a4d3..56ebb731be 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCAuditConfigurationPolicy/MSFT_SCAuditConfigurationPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCAuditConfigurationPolicy/MSFT_SCAuditConfigurationPolicy.psm1 @@ -91,9 +91,14 @@ function Get-TargetResource { Write-Verbose -Message "Found existing SCAuditConfigurationPolicy $Workload" $result = @{ - Ensure = 'Present' - Workload = $Workload - Credential = $Credential + Ensure = 'Present' + Workload = $Workload + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCAutoSensitivityLabelPolicy/MSFT_SCAutoSensitivityLabelPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCAutoSensitivityLabelPolicy/MSFT_SCAutoSensitivityLabelPolicy.psm1 index 319ee49fec..474c99c1db 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCAutoSensitivityLabelPolicy/MSFT_SCAutoSensitivityLabelPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCAutoSensitivityLabelPolicy/MSFT_SCAutoSensitivityLabelPolicy.psm1 @@ -205,6 +205,11 @@ function Get-TargetResource RemoveSharePointLocationException = $policy.RemoveSharePointLocationException AddSharePointLocation = $policy.AddSharePointLocation RemoveSharePointLocation = $policy.RemoveSharePointLocation + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCAutoSensitivityLabelRule/MSFT_SCAutoSensitivityLabelRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCAutoSensitivityLabelRule/MSFT_SCAutoSensitivityLabelRule.psm1 index 3266939b93..9faed9d3da 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCAutoSensitivityLabelRule/MSFT_SCAutoSensitivityLabelRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCAutoSensitivityLabelRule/MSFT_SCAutoSensitivityLabelRule.psm1 @@ -324,6 +324,11 @@ function Get-TargetResource SubjectMatchesPatterns = $PolicyRule.SubjectMatchesPatterns Ensure = 'Present' Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } $paramsToRemove = @() diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldPolicy/MSFT_SCCaseHoldPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldPolicy/MSFT_SCCaseHoldPolicy.psm1 index e5079994b3..69d2d899a5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldPolicy/MSFT_SCCaseHoldPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldPolicy/MSFT_SCCaseHoldPolicy.psm1 @@ -103,14 +103,20 @@ function Get-TargetResource { Write-Verbose "Found existing SCCaseHoldPolicy $($Name)" $result = @{ - Ensure = 'Present' - Name = $PolicyObject.Name - Case = $Case - Enabled = $PolicyObject.Enabled - Comment = $PolicyObject.Comment - ExchangeLocation = $PolicyObject.ExchangeLocation.Name - PublicFolderLocation = $PolicyObject.PublicFolderLocation.Name - SharePointLocation = $PolicyObject.SharePointLocation.Name + Ensure = 'Present' + Name = $PolicyObject.Name + Case = $Case + Enabled = $PolicyObject.Enabled + Comment = $PolicyObject.Comment + ExchangeLocation = $PolicyObject.ExchangeLocation.Name + PublicFolderLocation = $PolicyObject.PublicFolderLocation.Name + SharePointLocation = $PolicyObject.SharePointLocation.Name + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldRule/MSFT_SCCaseHoldRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldRule/MSFT_SCCaseHoldRule.psm1 index 141bc48452..8e7ec6d2e9 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldRule/MSFT_SCCaseHoldRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCCaseHoldRule/MSFT_SCCaseHoldRule.psm1 @@ -96,13 +96,18 @@ function Get-TargetResource Write-Verbose "Found existing SCCaseHoldRule $($Name)" $result = @{ - Name = $Rule.Name - Policy = $Policy - Comment = $Rule.Comment - Disabled = $Rule.Disabled - ContentMatchQuery = $Rule.ContentMatchQuery - Credential = $Credential - Ensure = 'Present' + Name = $Rule.Name + Policy = $Policy + Comment = $Rule.Comment + Disabled = $Rule.Disabled + ContentMatchQuery = $Rule.ContentMatchQuery + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceCase/MSFT_SCComplianceCase.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceCase/MSFT_SCComplianceCase.psm1 index 411cecbb46..dca0745246 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceCase/MSFT_SCComplianceCase.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceCase/MSFT_SCComplianceCase.psm1 @@ -92,11 +92,16 @@ function Get-TargetResource $Status = 'Closed' } $result = @{ - Name = $Case.Name - Description = $Case.Description - Status = $Status - Credential = $Credential - Ensure = 'Present' + Name = $Case.Name + Description = $Case.Description + Status = $Status + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceSearch/MSFT_SCComplianceSearch.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceSearch/MSFT_SCComplianceSearch.psm1 index 981b33f659..c1cd6720af 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceSearch/MSFT_SCComplianceSearch.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceSearch/MSFT_SCComplianceSearch.psm1 @@ -147,6 +147,11 @@ function Get-TargetResource SharePointLocation = $Search.SharePointLocation SharePointLocationExclusion = $Search.SharePointLocationExclusion Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword Ensure = 'Present' } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceSearchAction/MSFT_SCComplianceSearchAction.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceSearchAction/MSFT_SCComplianceSearchAction.psm1 index f57506faf6..949bd5d466 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceSearchAction/MSFT_SCComplianceSearchAction.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceSearchAction/MSFT_SCComplianceSearchAction.psm1 @@ -136,6 +136,11 @@ function Get-TargetResource RetryOnError = $currentAction.Retry ActionScope = $ScopeValue Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword Ensure = 'Present' } } @@ -143,12 +148,17 @@ function Get-TargetResource { $PurgeTP = Get-ResultProperty -ResultString $currentAction.Results -PropertyName 'Purge Type' $result = @{ - Action = $currentAction.Action - SearchName = $currentAction.SearchName - PurgeType = $PurgeTP - RetryOnError = $currentAction.Retry - Credential = $Credential - Ensure = 'Present' + Action = $currentAction.Action + SearchName = $currentAction.SearchName + PurgeType = $PurgeTP + RetryOnError = $currentAction.Retry + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } } diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceTag/MSFT_SCComplianceTag.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceTag/MSFT_SCComplianceTag.psm1 index 85838d039e..d9f0821fa4 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceTag/MSFT_SCComplianceTag.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCComplianceTag/MSFT_SCComplianceTag.psm1 @@ -120,18 +120,23 @@ function Get-TargetResource { Write-Verbose "Found existing ComplianceTag $($Name)" $result = @{ - Name = $tagObject.Name - Comment = $tagObject.Comment - RetentionDuration = $tagObject.RetentionDuration - IsRecordLabel = $tagObject.IsRecordLabel - Regulatory = $tagObject.Regulatory - Notes = $tagObject.Notes - ReviewerEmail = $tagObject.ReviewerEmail - RetentionAction = $tagObject.RetentionAction - EventType = $tagObject.EventType - RetentionType = $tagObject.RetentionType - Credential = $Credential - Ensure = 'Present' + Name = $tagObject.Name + Comment = $tagObject.Comment + RetentionDuration = $tagObject.RetentionDuration + IsRecordLabel = $tagObject.IsRecordLabel + Regulatory = $tagObject.Regulatory + Notes = $tagObject.Notes + ReviewerEmail = $tagObject.ReviewerEmail + RetentionAction = $tagObject.RetentionAction + EventType = $tagObject.EventType + RetentionType = $tagObject.RetentionType + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } if (-not [System.String]::IsNullOrEmpty($tagObject.FilePlanMetadata)) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCDLPCompliancePolicy/MSFT_SCDLPCompliancePolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCDLPCompliancePolicy/MSFT_SCDLPCompliancePolicy.psm1 index 4661892480..987c430de6 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCDLPCompliancePolicy/MSFT_SCDLPCompliancePolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCDLPCompliancePolicy/MSFT_SCDLPCompliancePolicy.psm1 @@ -160,6 +160,12 @@ function Get-TargetResource SharePointLocationException = $PolicyObject.SharePointLocationException TeamsLocation = $PolicyObject.TeamsLocation.Name TeamsLocationException = $PolicyObject.TeamsLocationException + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCDLPComplianceRule/MSFT_SCDLPComplianceRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCDLPComplianceRule/MSFT_SCDLPComplianceRule.psm1 index 8a145e3947..8ecd81898b 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCDLPComplianceRule/MSFT_SCDLPComplianceRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCDLPComplianceRule/MSFT_SCDLPComplianceRule.psm1 @@ -281,6 +281,12 @@ function Get-TargetResource AnyOfRecipientAddressMatchesPatterns = $AnyOfRecipientAddressMatchesPatterns ContentExtensionMatchesWords = $ContentExtensionMatchesWords ExceptIfContentExtensionMatchesWords = $ExceptIfContentExtensionMatchesWords + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } $paramsToRemove = @() diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConditionalAccessPolicy/MSFT_SCDeviceConditionalAccessPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConditionalAccessPolicy/MSFT_SCDeviceConditionalAccessPolicy.psm1 index 85b1c5c49f..ff2a1d9a39 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConditionalAccessPolicy/MSFT_SCDeviceConditionalAccessPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConditionalAccessPolicy/MSFT_SCDeviceConditionalAccessPolicy.psm1 @@ -89,11 +89,16 @@ function Get-TargetResource { Write-Verbose "Found existing Device Conditional Access Policy $($Name)" $result = @{ - Ensure = 'Present' - Name = $PolicyObject.Name - Comment = $PolicyObject.Comment - Enabled = $PolicyObject.Enabled - Credential = $Credential + Ensure = 'Present' + Name = $PolicyObject.Name + Comment = $PolicyObject.Comment + Enabled = $PolicyObject.Enabled + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConfigurationPolicy/MSFT_SCDeviceConfigurationPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConfigurationPolicy/MSFT_SCDeviceConfigurationPolicy.psm1 index 225db9a9d9..94fe28557c 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConfigurationPolicy/MSFT_SCDeviceConfigurationPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCDeviceConfigurationPolicy/MSFT_SCDeviceConfigurationPolicy.psm1 @@ -89,11 +89,16 @@ function Get-TargetResource { Write-Verbose "Found existing Device Configuration Policy $($Name)" $result = @{ - Ensure = 'Present' - Name = $PolicyObject.Name - Comment = $PolicyObject.Comment - Enabled = $PolicyObject.Enabled - Credential = $Credential + Ensure = 'Present' + Name = $PolicyObject.Name + Comment = $PolicyObject.Comment + Enabled = $PolicyObject.Enabled + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyAuthority/MSFT_SCFilePlanPropertyAuthority.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyAuthority/MSFT_SCFilePlanPropertyAuthority.psm1 index 13f8515d8e..0237f8e7dc 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyAuthority/MSFT_SCFilePlanPropertyAuthority.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyAuthority/MSFT_SCFilePlanPropertyAuthority.psm1 @@ -80,9 +80,14 @@ function Get-TargetResource Write-Verbose "Found existing SCFilePlanPropertyAuthority $($Name)" $result = @{ - Name = $property.DisplayName - Credential = $Credential - Ensure = 'Present' + Name = $property.DisplayName + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyCategory/MSFT_SCFilePlanPropertyCategory.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyCategory/MSFT_SCFilePlanPropertyCategory.psm1 index 767d180a5a..b928c5d943 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyCategory/MSFT_SCFilePlanPropertyCategory.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyCategory/MSFT_SCFilePlanPropertyCategory.psm1 @@ -79,9 +79,14 @@ function Get-TargetResource Write-Verbose "Found existing SCFilePlanPropertyCategory $($Name)" $result = @{ - Name = $property.DisplayName - Credential = $Credential - Ensure = 'Present' + Name = $property.DisplayName + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyCitation/MSFT_SCFilePlanPropertyCitation.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyCitation/MSFT_SCFilePlanPropertyCitation.psm1 index 9db3e77dd0..f21b673c40 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyCitation/MSFT_SCFilePlanPropertyCitation.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyCitation/MSFT_SCFilePlanPropertyCitation.psm1 @@ -89,11 +89,16 @@ function Get-TargetResource Write-Verbose "Found existing SCFilePlanPropertyCitation $($Name)" $result = @{ - Name = $property.Name - CitationUrl = $property.CitationUrl - CitationJurisdiction = $property.CitationJurisdiction - Credential = $Credential - Ensure = 'Present' + Name = $property.Name + CitationUrl = $property.CitationUrl + CitationJurisdiction = $property.CitationJurisdiction + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyDepartment/MSFT_SCFilePlanPropertyDepartment.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyDepartment/MSFT_SCFilePlanPropertyDepartment.psm1 index 6c4ed09e69..25da840745 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyDepartment/MSFT_SCFilePlanPropertyDepartment.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyDepartment/MSFT_SCFilePlanPropertyDepartment.psm1 @@ -80,9 +80,14 @@ function Get-TargetResource Write-Verbose "Found existing SCFilePlanPropertyDepartment $($Name)" $result = @{ - Name = $property.DisplayName - Credential = $Credential - Ensure = 'Present' + Name = $property.DisplayName + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyReferenceId/MSFT_SCFilePlanPropertyReferenceId.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyReferenceId/MSFT_SCFilePlanPropertyReferenceId.psm1 index 14815c24e4..6a49c92def 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyReferenceId/MSFT_SCFilePlanPropertyReferenceId.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertyReferenceId/MSFT_SCFilePlanPropertyReferenceId.psm1 @@ -80,9 +80,14 @@ function Get-TargetResource Write-Verbose "Found existing SCFilePlanPropertyReferenceId $($Name)" $result = @{ - Name = $property.DisplayName - Credential = $Credential - Ensure = 'Present' + Name = $property.DisplayName + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertySubCategory/MSFT_SCFilePlanPropertySubCategory.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertySubCategory/MSFT_SCFilePlanPropertySubCategory.psm1 index 5e9e622eff..237afd2a18 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertySubCategory/MSFT_SCFilePlanPropertySubCategory.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCFilePlanPropertySubCategory/MSFT_SCFilePlanPropertySubCategory.psm1 @@ -94,10 +94,15 @@ function Get-TargetResource Write-Verbose "Found existing SCFilePlanPropertySubCategory $($Name)" $result = @{ - Name = $property.DisplayName - Category = $parent.DisplayName - Credential = $Credential - Ensure = 'Present' + Name = $property.DisplayName + Category = $parent.DisplayName + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } Write-Verbose -Message "Get-TargetResource Result: `n $(Convert-M365DscHashtableToString -Hashtable $result)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCLabelPolicy/MSFT_SCLabelPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCLabelPolicy/MSFT_SCLabelPolicy.psm1 index 4bdf171bad..cb3b7383b5 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCLabelPolicy/MSFT_SCLabelPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCLabelPolicy/MSFT_SCLabelPolicy.psm1 @@ -162,6 +162,11 @@ function Get-TargetResource Comment = $policy.Comment AdvancedSettings = $advancedSettingsValue Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword Ensure = 'Present' Labels = $policy.Labels ExchangeLocation = Convert-ArrayList -CurrentProperty $policy.ExchangeLocation diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCProtectionAlert/MSFT_SCProtectionAlert.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCProtectionAlert/MSFT_SCProtectionAlert.psm1 index 223715ce36..f3006729aa 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCProtectionAlert/MSFT_SCProtectionAlert.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCProtectionAlert/MSFT_SCProtectionAlert.psm1 @@ -184,6 +184,11 @@ function Get-TargetResource Category = $AlertObject.Category Comment = $AlertObject.Comment Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword Disabled = $AlertObject.Disabled Filter = $AlertObject.Filter Name = $AlertObject.Name diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionCompliancePolicy/MSFT_SCRetentionCompliancePolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionCompliancePolicy/MSFT_SCRetentionCompliancePolicy.psm1 index 1005948f6a..759f524a93 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionCompliancePolicy/MSFT_SCRetentionCompliancePolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionCompliancePolicy/MSFT_SCRetentionCompliancePolicy.psm1 @@ -167,6 +167,11 @@ function Get-TargetResource TeamsChatLocation = @() TeamsChatLocationException = @() Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } if ($PolicyObject.TeamsChannelLocation.Count -gt 0) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionComplianceRule/MSFT_SCRetentionComplianceRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionComplianceRule/MSFT_SCRetentionComplianceRule.psm1 index f21c38fec3..cd4d8c434f 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionComplianceRule/MSFT_SCRetentionComplianceRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionComplianceRule/MSFT_SCRetentionComplianceRule.psm1 @@ -129,6 +129,11 @@ function Get-TargetResource RetentionDurationDisplayHint = $RuleObject.RetentionDurationDisplayHint ExpirationDateOption = $RuleObject.ExpirationDateOption Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword Ensure = 'Present' } if (-not $associatedPolicy.TeamsPolicy) diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionEventType/MSFT_SCRetentionEventType.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionEventType/MSFT_SCRetentionEventType.psm1 index ac0f5b199a..a1ddcf0ddf 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionEventType/MSFT_SCRetentionEventType.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionEventType/MSFT_SCRetentionEventType.psm1 @@ -84,10 +84,15 @@ function Get-TargetResource { Write-Verbose "Found existing RetentionComplianceEventType $($Name)" $result = @{ - Name = $EventTypeObject.Name - Comment = $EventTypeObject.Comment - Credential = $Credential - Ensure = 'Present' + Name = $EventTypeObject.Name + Comment = $EventTypeObject.Comment + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword + Ensure = 'Present' } Write-Verbose -Message "Found RetentionComplianceEventType $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCSensitivityLabel/MSFT_SCSensitivityLabel.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCSensitivityLabel/MSFT_SCSensitivityLabel.psm1 index 85f3049f68..9f8fa76c17 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCSensitivityLabel/MSFT_SCSensitivityLabel.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCSensitivityLabel/MSFT_SCSensitivityLabel.psm1 @@ -348,6 +348,11 @@ function Get-TargetResource Tooltip = $label.Tooltip Disabled = $label.Disabled Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword Ensure = 'Present' ApplyContentMarkingFooterAlignment = $label.ApplyContentMarkingFooterAlignment ApplyContentMarkingFooterEnabled = $label.ApplyContentMarkingFooterEnabled diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCSupervisoryReviewPolicy/MSFT_SCSupervisoryReviewPolicy.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCSupervisoryReviewPolicy/MSFT_SCSupervisoryReviewPolicy.psm1 index 4e6bdc694c..898fb2dc62 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCSupervisoryReviewPolicy/MSFT_SCSupervisoryReviewPolicy.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCSupervisoryReviewPolicy/MSFT_SCSupervisoryReviewPolicy.psm1 @@ -87,11 +87,16 @@ function Get-TargetResource { Write-Verbose "Found existing SupervisoryReviewPolicy $($Name)" $result = @{ - Name = $PolicyObject.Name - Comment = $PolicyObject.Comment - Reviewers = $PolicyObject.Reviewers - Ensure = 'Present' - Credential = $Credential + Name = $PolicyObject.Name + Comment = $PolicyObject.Comment + Reviewers = $PolicyObject.Reviewers + Ensure = 'Present' + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } Write-Verbose -Message "Found SupervisoryReviewPolicy $($Name)" diff --git a/Modules/Microsoft365DSC/DSCResources/MSFT_SCSupervisoryReviewRule/MSFT_SCSupervisoryReviewRule.psm1 b/Modules/Microsoft365DSC/DSCResources/MSFT_SCSupervisoryReviewRule/MSFT_SCSupervisoryReviewRule.psm1 index cd9f50acda..fcc98e358a 100644 --- a/Modules/Microsoft365DSC/DSCResources/MSFT_SCSupervisoryReviewRule/MSFT_SCSupervisoryReviewRule.psm1 +++ b/Modules/Microsoft365DSC/DSCResources/MSFT_SCSupervisoryReviewRule/MSFT_SCSupervisoryReviewRule.psm1 @@ -94,12 +94,17 @@ function Get-TargetResource $PolicyName = (Get-SupervisoryReviewPolicyV2 -Identity $RuleObject.Policy).Name $result = @{ - Name = $RuleObject.Name - Policy = $PolicyName - Condition = $RuleObject.Condition - SamplingRate = $RuleObject.SamplingRate - Ensure = 'Present' - Credential = $Credential + Name = $RuleObject.Name + Policy = $PolicyName + Condition = $RuleObject.Condition + SamplingRate = $RuleObject.SamplingRate + Ensure = 'Present' + Credential = $Credential + ApplicationId = $ApplicationId + TenantId = $TenantId + CertificateThumbprint = $CertificateThumbprint + CertificatePath = $CertificatePath + CertificatePassword = $CertificatePassword } Write-Verbose -Message "Found SupervisoryReviewRule $($Name)"