-
Notifications
You must be signed in to change notification settings - Fork 531
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
Incorrect Reporting/Delta reports if multiple values in one attribute/key. Example:-ExchangeSenderMemberOf = @("{" #2545
Comments
DSCparser module shows a clear error with the Microsoft365DSC module.
Method invocation failed because [System.Object[]] does not contain a method named 'op_Addition'.
Name Value ResourceName SCDLPCompliancePolicy PS C:\WINDOWS\system32> |
@malauter could you have a look at this issue. Either the escaping of the string does not work properly or we need to change the datatype of these props. |
Details of the scenario you tried and the problem that is occurring
Verbose logs showing the problem
PS C:\WINDOWS\system32> New-M365DSCDeltaReport -Destination D:\ParserDSC\nochange\config\M365TenantConfig.ps1 -source D:\ParserDSC\nochange\config1\M365TenantConfig.ps1 -OutputPath D:\ParserDSC\nochangedelta.html -Verbose
VERBOSE: Obtaining Delta between the source and destination configurations
VERBOSE: Loading file 'D:\ParserDSC\nochange\config1\M365TenantConfig.ps1'
Method invocation failed because [System.Object[]] does not contain a method named 'op_Addition'.
At C:\Program Files\WindowsPowerShell\Modules\DSCParser\1.3.0.6\modules\DSCParser.psm1:185 char:21
Method invocation failed because [System.Object[]] does not contain a method named 'op_Addition'.
At C:\Program Files\WindowsPowerShell\Modules\DSCParser\1.3.0.6\modules\DSCParser.psm1:185 char:21
Method invocation failed because [System.Object[]] does not contain a method named 'op_Addition'.
At C:\Program Files\WindowsPowerShell\Modules\DSCParser\1.3.0.6\modules\DSCParser.psm1:185 char:21
Method invocation failed because [System.Object[]] does not contain a method named 'op_Addition'.
At C:\Program Files\WindowsPowerShell\Modules\DSCParser\1.3.0.6\modules\DSCParser.psm1:185 char:21
VERBOSE: Loading file 'D:\ParserDSC\nochange\config\M365TenantConfig.ps1'
Method invocation failed because [System.Object[]] does not contain a method named 'op_Addition'.
At C:\Program Files\WindowsPowerShell\Modules\DSCParser\1.3.0.6\modules\DSCParser.psm1:185 char:21
Method invocation failed because [System.Object[]] does not contain a method named 'op_Addition'.
At C:\Program Files\WindowsPowerShell\Modules\DSCParser\1.3.0.6\modules\DSCParser.psm1:185 char:21
PS C:\WINDOWS\system32>
Suggested solution to the issue
SCDLPCompliancePolicy f08a2b88-035e-452a-9a63-5ed5e3981d15
{
Comment = "Create a custom policy from scratch. You will choose the type of content to protect and how you want to protect it.";
Credential = $Credscredential;
Ensure = "Present";
ExchangeLocation = "All";
ExchangeSenderMemberOf = @("{"PrimarySmtpAddress":"maheshCase@$OrganizationName","Id":"1c2f32f8-6e1b-4ab9-98cf-70f82be732dc","ExchangeObjectId":"1c2f32f8-6e1b-4ab9-98cf-70f82be732dc","ExternalDirectoryObjectId":"1c2f32f8-6e1b-4ab9-98cf-70f82be732dc","DisplayName":"maheshCase","RecipientType":7,"RecipientTypeDetails":8796093022208,"AdministrativeUnits":null}");
ExchangeSenderMemberOfException = @("{"PrimarySmtpAddress":"","Id":"ef1a0e3c-676d-40de-87e8-4e4435fa5a22","ExchangeObjectId":"ef1a0e3c-676d-40de-87e8-4e4435fa5a22","ExternalDirectoryObjectId":"ef1a0e3c-676d-40de-87e8-4e4435fa5a22","DisplayName":"Contoso Web App Users","RecipientType":6,"RecipientTypeDetails":524288,"AdministrativeUnits":null}");
Mode = "Enable";
Name = "DLP policy Parser error";
OneDriveLocation = "All";
OneDriveLocationException = @();
Priority = 2;
SharePointLocation = "All";
SharePointLocationException = @();
TeamsLocation = "All";
TeamsLocationException = @();
}
The DSC configuration that is used to reproduce the issue (as detailed as possible)
param (
[parameter()]
[System.Management.Automation.PSCredential]
$Credential
)
Configuration M365TenantConfig
{
param (
[parameter()]
[System.Management.Automation.PSCredential]
$Credential
)
MSFT_SCDLPSensitiveInformation
{
name = 'ABA Routing Number'
id = 'cb353f78-2b72-4c3c-8827-92ebe4f69fdf'
maxconfidence = '100'
minconfidence = '75'
classifiertype = 'Content'
mincount = '1'
maxcount = '-1'
}
) }
;
Credential = $Credscredential;
Disabled = $False;
DocumentIsPasswordProtected = $False;
DocumentIsUnsupported = $False;
Ensure = "Present";
ExceptIfDocumentIsPasswordProtected = $False;
ExceptIfDocumentIsUnsupported = $False;
ExceptIfHasSenderOverride = $False;
ExceptIfProcessingLimitExceeded = $False;
GenerateAlert = @("true");
HasSenderOverride = $False;
Name = "DSC test parser error";
Policy = "DLP policy Parser error";
ProcessingLimitExceeded = $False;
RemoveRMSTemplate = $False;
ReportSeverityLevel = "Low";
StopPolicyProcessing = $False;
}
SCDLPComplianceRule 6e9df3e2-7be5-4cda-9f0e-767bf5b4752d
{
BlockAccess = $False;
ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation
{
SensitiveInformation = @(
MSFT_SCDLPSensitiveInformation
{
name = 'Keyword Symantec@123'
id = 'e932c3e1-53f2-49d7-8db3-826c114b9618'
maxconfidence = '100'
minconfidence = '85'
classifiertype = 'Content'
mincount = '1'
maxcount = '-1'
}
) }
;
Credential = $Credscredential;
Disabled = $False;
DocumentIsPasswordProtected = $False;
DocumentIsUnsupported = $False;
Ensure = "Present";
ExceptIfDocumentIsPasswordProtected = $False;
ExceptIfDocumentIsUnsupported = $False;
ExceptIfHasSenderOverride = $False;
ExceptIfProcessingLimitExceeded = $False;
GenerateAlert = @("true");
HasSenderOverride = $False;
Name = "SymantecDLP";
Policy = "SymantecDLP";
ProcessingLimitExceeded = $False;
RemoveRMSTemplate = $False;
ReportSeverityLevel = "Low";
StopPolicyProcessing = $False;
}
SCDLPComplianceRule c8d7c3e2-4de5-46bb-937d-1dd3e4a76c95
{
BlockAccess = $False;
Comment = "This default policy will monitor credit card details with a rule to notify the Administrator.";
ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation
{
SensitiveInformation = @(
MSFT_SCDLPSensitiveInformation
{
name = 'Credit Card Number'
id = '50842eb7-edc8-4019-85dd-5a5c1f2bb085'
maxconfidence = '100'
minconfidence = '85'
classifiertype = 'Content'
mincount = '1'
maxcount = '-1'
}
) }
;
Credential = $Credscredential;
Disabled = $False;
DocumentIsPasswordProtected = $False;
DocumentIsUnsupported = $False;
Ensure = "Present";
ExceptIfDocumentIsPasswordProtected = $False;
ExceptIfDocumentIsUnsupported = $False;
ExceptIfHasSenderOverride = $False;
ExceptIfProcessingLimitExceeded = $False;
GenerateIncidentReport = @("SiteAdmin");
HasSenderOverride = $False;
IncidentReportContent = @("Title","DocumentAuthor","DocumentLastModifier","Service","MatchedItem","RulesMatched","Detections","Severity","RetentionLabel","SensitivityLabel");
Name = "Default Teams DLP policy rule";
Policy = "Default policy for Teams";
ProcessingLimitExceeded = $False;
RemoveRMSTemplate = $False;
ReportSeverityLevel = "Low";
StopPolicyProcessing = $False;
}
}
}
M365TenantConfig -ConfigurationData .\ConfigurationData.psd1 -Credential $Credential
The operating system the target node is running
OsName : Microsoft Windows 10 Pro
OsOperatingSystemSKU : 48
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage : en-US
OsMuiLanguages : {en-US}
Version of the DSC module that was used ('dev' if using current dev branch)
PS C:\WINDOWS\system32> Get-Module Microsoft365DSC | fl name,version
Name : Microsoft365DSC
Version : 1.22.1109.1
Powershell
Name Value
PSVersion 5.1.19041.1682
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1682
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
The text was updated successfully, but these errors were encountered: