Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2989 #3010

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,19 +136,29 @@ function Get-TargetResource
RetryOnError = $currentAction.Retry
ActionScope = $ScopeValue
Credential = $Credential
ApplicationId = $ApplicationId
TenantId = $TenantId
CertificateThumbprint = $CertificateThumbprint
CertificatePath = $CertificatePath
CertificatePassword = $CertificatePassword
Ensure = 'Present'
}
}
else
{
$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'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = @()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down
Loading