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

[SCLabelPolicy/SCRetentionComplianceRule] - A parameter cannot be found that matches parameter name 'ApplicationId'. #3075

Closed
lpercetti opened this issue Mar 27, 2023 · 3 comments · Fixed by #3083, #3106 or #3140
Assignees
Labels
Bug Something isn't working Security & Compliance Center V1.23.322.1 Version 1.23.322.1

Comments

@lpercetti
Copy link

Details of the scenario you tried and the problem that is occurring

Same issue as #3050

Verbose logs showing the problem

2023-03-27T09:21:41.8667895Z A parameter cannot be found that matches parameter name 'ApplicationId'.
2023-03-27T09:21:41.8669136Z     + CategoryInfo          : InvalidArgument: (:) [], CimException
2023-03-27T09:21:41.8669834Z     + FullyQualifiedErrorId : NamedParameterNotFound,Set-LabelPolicy
2023-03-27T09:21:41.8670478Z     + PSComputerName        : localhost
2023-03-27T09:21:41.8670943Z  
2023-03-27T09:21:41.8779147Z VERBOSE: [WIN-BMTGCRHIQ2U]: LCM:  [ End    Set      ]  [[SCLabelPolicy]LABELPOLICY-DEFAULT]  in 3.9690 seconds.
2023-03-27T09:21:41.8829156Z The PowerShell DSC resource '[SCLabelPolicy]LABELPOLICY-DEFAULT' with SourceInfo 
2023-03-27T09:21:41.8830876Z 'D:\a\r1\a\_repo\SecurityCompliance.ps1::743::3::SCLabelPolicy' threw one or more non-terminating errors 
2023-03-27T09:21:41.8832299Z while running the Set-TargetResource functionality. These errors are logged to the ETW channel called 
2023-03-27T09:21:41.8835123Z Microsoft-Windows-DSC/Operational. Refer to this channel for more details.
2023-03-27T09:21:41.8836078Z     + CategoryInfo          : InvalidOperation: (:) [], CimException
2023-03-27T09:21:41.8837404Z     + FullyQualifiedErrorId : NonTerminatingErrorFromProvider
2023-03-27T09:21:41.8838005Z     + PSComputerName        : localhost
2023-03-27T09:21:41.8838355Z  
2023-03-27T09:21:41.8862127Z VERBOSE: [WIN-BMTGCRHIQ2U]: LCM:  [ End    Set      ]
2023-03-27T09:21:41.8903484Z The SendConfigurationApply function did not succeed.
2023-03-27T09:21:41.8905357Z     + CategoryInfo          : NotSpecified: (root/Microsoft/...gurationManager:String) [], CimException
2023-03-27T09:21:41.8906087Z     + FullyQualifiedErrorId : MI RESULT 1
2023-03-27T09:21:41.8907000Z     + PSComputerName        : localhost

Suggested solution to the issue

https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/DSCResources/MSFT_SCLabelPolicy/MSFT_SCLabelPolicy.psm1
Add $VAR.Remove('ApplicationId') | Out-Null
etc on all interaction with native MS commands.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here

The operating system the target node is running

OsName : Microsoft Windows Server 2022 Datacenter Azure Edition
OsOperatingSystemSKU : 407
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage : en-US
OsMuiLanguages : {en-US}

Version of the DSC module that was used ('dev' if using current dev branch)

1.23.322.1

@lpercetti
Copy link
Author

Same issue in SCRetentionComplianceRule. Should I open another issue for that or can we regroup them here?
https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/DSCResources/MSFT_SCRetentionComplianceRule/MSFT_SCRetentionComplianceRule.psm1

@andikrueger andikrueger added Bug Something isn't working Security & Compliance Center V1.23.322.1 Version 1.23.322.1 labels Mar 27, 2023
@ykuijs ykuijs changed the title SCLabelPolicy - A parameter cannot be found that matches parameter name 'ApplicationId'. [SCLabelPolicy/SCRetentionComplianceRule] - A parameter cannot be found that matches parameter name 'ApplicationId'. Mar 27, 2023
@ykuijs
Copy link
Member

ykuijs commented Mar 27, 2023

Just updated the title to reflect both resources

@ykuijs ykuijs self-assigned this Mar 28, 2023
@ykuijs ykuijs mentioned this issue Mar 28, 2023
ykuijs added a commit that referenced this issue Mar 28, 2023
@martincaddick
Copy link
Contributor

@ykuijs
Looking at the changes that were made to the psm1 and assuming that all of the other SC*.psm1 files will need the same changes.

image
Current status of them all is:
SCAuditConfigurationPolicy - Not done
SCAutoSensitivityLabelPolicy - Not done
SCAutoSensitivityLabelRule - Not done
SCCaseHoldPolicy - Not done
SCCaseHoldRule - Not done
SCComplianceCase - Not done
SCComplianceSearch - Not done
SCComplianceTag - Not done
SCDLPCompliancePolicy - Done
SCDLPComplianceRule - Not done
SCDeviceConditionalAccessPolicy - Not done
SCDeviceConfigurationPolicy - Not done
SCFilePlanPropertyAuthority - Not done
SCFilePlanPropertyCategory - Not done
SCFilePlanPropertyCitation - Not done
SCFilePlanPropertyDepartment - Not done
SCFilePlanPropertyReferenceId - Not done
SCFilePlanPropertySubCategory - Not done
SCLabelPolicy - Done
SCProtectionAlert - Not done
SCRetentionCompliancePolicy - Done
SCRetentionComplianceRule - Done
SCRetentionEventType - Not done
SCSensitivityLabel - Done
SCSupervisoryReviewPolicy - Not done
SCSupervisoryReviewRule - Not done

Happy to raise a new issue if you like

ykuijs added a commit that referenced this issue Mar 31, 2023
[BREAKING CHANGE] Fixed #3024 and #3075
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Security & Compliance Center V1.23.322.1 Version 1.23.322.1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants