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

SCSensitivityLabel : fixed issues due to authentication parameters #3051

Merged
merged 1 commit into from
Mar 21, 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
FIXES [#3035](https://github.com/microsoft/Microsoft365DSC/issues/3035)
* Deprecated all FontName properties, since these are no longer configurable.
FIXES [#3035](https://github.com/microsoft/Microsoft365DSC/issues/3035)
* Fixed the collection of new and set parameters to ensure the correct values are passed to the New/Set cmdlets.
FIXES [#3050](https://github.com/microsoft/Microsoft365DSC/issues/3050)
* MISC
* Added QA test that checks for existence of an example for each resource.
* DRG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -837,11 +837,20 @@ function Set-TargetResource
$CreationParams.Remove('SiteAndGroupExternalSharingControlType')
}

$CreationParams.Remove('Credential') | Out-Null
$CreationParams.Remove('Ensure') | Out-Null
$CreationParams.Remove('Priority') | Out-Null
$CreationParams.Remove('Disabled') | Out-Null

# Remove authentication parameters
$CreationParams.Remove('Ensure') | Out-Null
$CreationParams.Remove('Credential') | Out-Null
$CreationParams.Remove('ApplicationId') | Out-Null
$CreationParams.Remove('TenantId') | Out-Null
$CreationParams.Remove('CertificatePath') | Out-Null
$CreationParams.Remove('CertificatePassword') | Out-Null
$CreationParams.Remove('CertificateThumbprint') | Out-Null
$CreationParams.Remove('ManagedIdentity') | Out-Null
$CreationParams.Remove('ApplicationSecret') | Out-Null

try
{
Write-Verbose -Message "Creating Label {$Name}"
Expand Down Expand Up @@ -878,11 +887,20 @@ function Set-TargetResource
}

#Remove unused parameters for Set-Label cmdlet
$SetParams.Remove('Credential') | Out-Null
$SetParams.Remove('Ensure') | Out-Null
$SetParams.Remove('Name') | Out-Null
$SetParams.Remove('Disabled') | Out-Null

# Remove authentication parameters
$SetParams.Remove('Ensure') | Out-Null
$SetParams.Remove('Credential') | Out-Null
$SetParams.Remove('ApplicationId') | Out-Null
$SetParams.Remove('TenantId') | Out-Null
$SetParams.Remove('CertificatePath') | Out-Null
$SetParams.Remove('CertificatePassword') | Out-Null
$SetParams.Remove('CertificateThumbprint') | Out-Null
$SetParams.Remove('ManagedIdentity') | Out-Null
$SetParams.Remove('ApplicationSecret') | Out-Null

try
{
Set-Label @SetParams -Identity $Name
Expand Down