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

SCAutoSensitivityLabelRule - Setting error #4641

Open
hvdbrink opened this issue May 6, 2024 · 1 comment
Open

SCAutoSensitivityLabelRule - Setting error #4641

hvdbrink opened this issue May 6, 2024 · 1 comment
Labels
Bug Something isn't working Security & Compliance Center V1.24.424.1 Version 1.24.424.1

Comments

@hvdbrink
Copy link

hvdbrink commented May 6, 2024

Description of the issue

When importing an SCAutoSensitivityLabelRule it fails because during the proces the variable $HeaderMatchesPatterns is getting filled even when it's not even specified in the configuration.

`[DBG]: [Process:52604]: [Runspace195]: PS C:\WINDOWS\system32>> $CreationParams

Key Value


Name General Data Protection Regulation (GDPR) Enhanced-ODB
Policy Labelingpolicy
ContentContainsSensitiveInformation {System.Collections.Hashtable, System.Collections.Hashtable, System.Collections.H...
Disabled False
DocumentIsPasswordProtected False
DocumentIsUnsupported False
ExceptIfDocumentIsPasswordProtected False
ExceptIfDocumentIsUnsupported False
ExceptIfProcessingLimitExceeded False
ProcessingLimitExceeded False
ReportSeverityLevel Low
Workload Exchange
HeaderMatchesPatterns {}
Verbose True
`

When creating the labelpolicyrule you'll get this error
Write-ErrorMessage : |Microsoft.Exchange.Management.UnifiedPolicy.ErrorPredicateLocationSupportException|Using the 'HeaderMatchesPatterns' parameter is supported only for Exchange content. Either remove this parameter or turn on only the Exchange location.

Microsoft 365 DSC Version

1.24.424.1

Which workloads are affected

Security & Compliance Center

The DSC configuration

`
		SCAutoSensitivityLabelPolicy "SCAutoSensitivityLabelPolicy-SSB AutoLabeling Restrictions"
        {
            ApplicationId                   = $ConfigurationData.NonNodeData.ApplicationId;
            ApplySensitivityLabel           = "Label-03B";
            CertificateThumbprint           = $ConfigurationData.NonNodeData.CertificateThumbprint;
            Comment                         = "SSB Autolabeling policy restriction sensitive data GDPR (AVG)";
            Ensure                          = "Present";
            ExchangeLocation                = @("All");
            ExchangeSender                  = @();
            ExchangeSenderException         = @();
            ExchangeSenderMemberOf          = @();
            ExchangeSenderMemberOfException = @();
            Mode                            = "TestWithoutNotifications";
            Name                            = "SSB AutoLabeling Restrictions";
            OneDriveLocation                = @("All");
            OneDriveLocationException       = @();
            Priority                        = 0;
            SharePointLocation              = @("All");
            SharePointLocationException     = @();
            TenantId                        = $OrganizationName;
        }
        SCAutoSensitivityLabelPolicy "SCAutoSensitivityLabelPolicy-SSB AutoLabeling High Restrictions"
        {
            ApplicationId                   = $ConfigurationData.NonNodeData.ApplicationId;
            ApplySensitivityLabel           = "Label-03C";
            CertificateThumbprint           = $ConfigurationData.NonNodeData.CertificateThumbprint;
            Comment                         = "SSB Autolabeling restriction sensitive data High Restrictions.";
            Ensure                          = "Present";
            ExchangeLocation                = @("All");
            ExchangeSender                  = @();
            ExchangeSenderException         = @();
            ExchangeSenderMemberOf          = @();
            ExchangeSenderMemberOfException = @();
            Mode                            = "TestWithoutNotifications";
            Name                            = "SSB AutoLabeling High Restrictions";
            OneDriveLocation                = @("All");
            OneDriveLocationException       = @();
            Priority                        = 1;
            SharePointLocation              = @("All");
            SharePointLocationException     = @();
            TenantId                        = $OrganizationName;
        }
		SCAutoSensitivityLabelRule "SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) High EXO-Exchange"
        {
            ApplicationId                       = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint               = $ConfigurationData.NonNodeData.CertificateThumbprint;
            ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation {
                SensitiveInformation = @(
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Citizen''s Service (BSN) Number'
                        id = 'c5f54253-ef7e-44f6-a578-440ed67e946d'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Driver''s License Number'
                        id = '6247fbea-ab80-4be5-8233-308b7c031401'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Passport Number'
                        id = '61786727-bafd-45f6-94d9-888d815e228e'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Physical Addresses'
                        id = 'b3650e47-f2dc-4d29-a4fc-1b9154005c07'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Tax Identification Number'
                        id = '01f42a64-eba7-4892-a67b-398237e4ade2'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Value Added Tax Number'
                        id = '4f320d9b-4972-41ae-b337-88d499bb1ade'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'International Banking Account Number (IBAN)'
                        id = 'e7dc4711-11b7-4cb0-b88b-2c394a771f0e'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                )
            };
            Disabled                            = $False;
            DocumentIsPasswordProtected         = $False;
            DocumentIsUnsupported               = $False;
            Ensure                              = "Present";
            ExceptIfDocumentIsPasswordProtected = $False;
            ExceptIfDocumentIsUnsupported       = $False;
            ExceptIfProcessingLimitExceeded     = $False;
            Name                                = "General Data Protection Regulation (GDPR) High EXO";
            Policy                              = "SSB AutoLabeling High Restrictions";
            ProcessingLimitExceeded             = $False;
            ReportSeverityLevel                 = "Low";
            TenantId                            = $OrganizationName;
            Workload                            = "Exchange";
        }
        SCAutoSensitivityLabelRule "SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) High EXO-SharePoint"
        {
            ApplicationId                       = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint               = $ConfigurationData.NonNodeData.CertificateThumbprint;
            ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation {
                SensitiveInformation = @(
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Citizen''s Service (BSN) Number'
                        id = 'c5f54253-ef7e-44f6-a578-440ed67e946d'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Driver''s License Number'
                        id = '6247fbea-ab80-4be5-8233-308b7c031401'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Passport Number'
                        id = '61786727-bafd-45f6-94d9-888d815e228e'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Physical Addresses'
                        id = 'b3650e47-f2dc-4d29-a4fc-1b9154005c07'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Tax Identification Number'
                        id = '01f42a64-eba7-4892-a67b-398237e4ade2'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Value Added Tax Number'
                        id = '4f320d9b-4972-41ae-b337-88d499bb1ade'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'International Banking Account Number (IBAN)'
                        id = 'e7dc4711-11b7-4cb0-b88b-2c394a771f0e'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                )
            };
            Disabled                            = $False;
            DocumentIsPasswordProtected         = $False;
            DocumentIsUnsupported               = $False;
            Ensure                              = "Present";
            ExceptIfDocumentIsPasswordProtected = $False;
            ExceptIfDocumentIsUnsupported       = $False;
            ExceptIfProcessingLimitExceeded     = $False;
            Name                                = "General Data Protection Regulation (GDPR) High EXO";
            Policy                              = "SSB AutoLabeling High Restrictions";
            ProcessingLimitExceeded             = $False;
            ReportSeverityLevel                 = "Low";
            TenantId                            = $OrganizationName;
            Workload                            = "SharePoint";
        }
        SCAutoSensitivityLabelRule "SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) High EXO-OneDriveForBusiness"
        {
            ApplicationId                       = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint               = $ConfigurationData.NonNodeData.CertificateThumbprint;
            ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation {
                SensitiveInformation = @(
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Citizen''s Service (BSN) Number'
                        id = 'c5f54253-ef7e-44f6-a578-440ed67e946d'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Driver''s License Number'
                        id = '6247fbea-ab80-4be5-8233-308b7c031401'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Passport Number'
                        id = '61786727-bafd-45f6-94d9-888d815e228e'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Physical Addresses'
                        id = 'b3650e47-f2dc-4d29-a4fc-1b9154005c07'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Tax Identification Number'
                        id = '01f42a64-eba7-4892-a67b-398237e4ade2'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Value Added Tax Number'
                        id = '4f320d9b-4972-41ae-b337-88d499bb1ade'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'International Banking Account Number (IBAN)'
                        id = 'e7dc4711-11b7-4cb0-b88b-2c394a771f0e'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                )
            };
            Disabled                            = $False;
            DocumentIsPasswordProtected         = $False;
            DocumentIsUnsupported               = $False;
            Ensure                              = "Present";
            ExceptIfDocumentIsPasswordProtected = $False;
            ExceptIfDocumentIsUnsupported       = $False;
            ExceptIfProcessingLimitExceeded     = $False;
            Name                                = "General Data Protection Regulation (GDPR) High EXO";
            Policy                              = "SSB AutoLabeling High Restrictions";
            ProcessingLimitExceeded             = $False;
            ReportSeverityLevel                 = "Low";
            TenantId                            = $OrganizationName;
            Workload                            = "OneDriveForBusiness";
        }
        SCAutoSensitivityLabelRule "SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) High - SPO-Exchange"
        {
            ApplicationId                       = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint               = $ConfigurationData.NonNodeData.CertificateThumbprint;
            ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation {
                SensitiveInformation = @(
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Citizen''s Service (BSN) Number'
                        id = 'c5f54253-ef7e-44f6-a578-440ed67e946d'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Driver''s License Number'
                        id = '6247fbea-ab80-4be5-8233-308b7c031401'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Passport Number'
                        id = '61786727-bafd-45f6-94d9-888d815e228e'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Physical Addresses'
                        id = 'b3650e47-f2dc-4d29-a4fc-1b9154005c07'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Tax Identification Number'
                        id = '01f42a64-eba7-4892-a67b-398237e4ade2'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Value Added Tax Number'
                        id = '4f320d9b-4972-41ae-b337-88d499bb1ade'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'International Banking Account Number (IBAN)'
                        id = 'e7dc4711-11b7-4cb0-b88b-2c394a771f0e'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                )
            };
            Disabled                            = $False;
            DocumentIsPasswordProtected         = $False;
            DocumentIsUnsupported               = $False;
            Ensure                              = "Present";
            ExceptIfDocumentIsPasswordProtected = $False;
            ExceptIfDocumentIsUnsupported       = $False;
            ExceptIfProcessingLimitExceeded     = $False;
            Name                                = "General Data Protection Regulation (GDPR) High - SPO";
            Policy                              = "SSB AutoLabeling High Restrictions";
            ProcessingLimitExceeded             = $False;
            ReportSeverityLevel                 = "Low";
            TenantId                            = $OrganizationName;
            Workload                            = "Exchange";
        }
        SCAutoSensitivityLabelRule "SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) High - SPO-SharePoint"
        {
            ApplicationId                       = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint               = $ConfigurationData.NonNodeData.CertificateThumbprint;
            ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation {
                SensitiveInformation = @(
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Citizen''s Service (BSN) Number'
                        id = 'c5f54253-ef7e-44f6-a578-440ed67e946d'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Driver''s License Number'
                        id = '6247fbea-ab80-4be5-8233-308b7c031401'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Passport Number'
                        id = '61786727-bafd-45f6-94d9-888d815e228e'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Physical Addresses'
                        id = 'b3650e47-f2dc-4d29-a4fc-1b9154005c07'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Tax Identification Number'
                        id = '01f42a64-eba7-4892-a67b-398237e4ade2'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Value Added Tax Number'
                        id = '4f320d9b-4972-41ae-b337-88d499bb1ade'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'International Banking Account Number (IBAN)'
                        id = 'e7dc4711-11b7-4cb0-b88b-2c394a771f0e'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                )
            };
            Disabled                            = $False;
            DocumentIsPasswordProtected         = $False;
            DocumentIsUnsupported               = $False;
            Ensure                              = "Present";
            ExceptIfDocumentIsPasswordProtected = $False;
            ExceptIfDocumentIsUnsupported       = $False;
            ExceptIfProcessingLimitExceeded     = $False;
            Name                                = "General Data Protection Regulation (GDPR) High - SPO";
            Policy                              = "SSB AutoLabeling High Restrictions";
            ProcessingLimitExceeded             = $False;
            ReportSeverityLevel                 = "Low";
            TenantId                            = $OrganizationName;
            Workload                            = "SharePoint";
        }
        SCAutoSensitivityLabelRule "SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) High - SPO-OneDriveForBusiness"
        {
            ApplicationId                       = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint               = $ConfigurationData.NonNodeData.CertificateThumbprint;
            ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation {
                SensitiveInformation = @(
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Citizen''s Service (BSN) Number'
                        id = 'c5f54253-ef7e-44f6-a578-440ed67e946d'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Driver''s License Number'
                        id = '6247fbea-ab80-4be5-8233-308b7c031401'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Passport Number'
                        id = '61786727-bafd-45f6-94d9-888d815e228e'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Physical Addresses'
                        id = 'b3650e47-f2dc-4d29-a4fc-1b9154005c07'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Tax Identification Number'
                        id = '01f42a64-eba7-4892-a67b-398237e4ade2'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Value Added Tax Number'
                        id = '4f320d9b-4972-41ae-b337-88d499bb1ade'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'International Banking Account Number (IBAN)'
                        id = 'e7dc4711-11b7-4cb0-b88b-2c394a771f0e'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                )
            };
            Disabled                            = $False;
            DocumentIsPasswordProtected         = $False;
            DocumentIsUnsupported               = $False;
            Ensure                              = "Present";
            ExceptIfDocumentIsPasswordProtected = $False;
            ExceptIfDocumentIsUnsupported       = $False;
            ExceptIfProcessingLimitExceeded     = $False;
            Name                                = "General Data Protection Regulation (GDPR) High - SPO";
            Policy                              = "SSB AutoLabeling High Restrictions";
            ProcessingLimitExceeded             = $False;
            ReportSeverityLevel                 = "Low";
            TenantId                            = $OrganizationName;
            Workload                            = "OneDriveForBusiness";
        }
        SCAutoSensitivityLabelRule "SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) High - ODB-Exchange"
        {
            ApplicationId                       = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint               = $ConfigurationData.NonNodeData.CertificateThumbprint;
            ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation {
                SensitiveInformation = @(
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Citizen''s Service (BSN) Number'
                        id = 'c5f54253-ef7e-44f6-a578-440ed67e946d'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Driver''s License Number'
                        id = '6247fbea-ab80-4be5-8233-308b7c031401'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Passport Number'
                        id = '61786727-bafd-45f6-94d9-888d815e228e'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Physical Addresses'
                        id = 'b3650e47-f2dc-4d29-a4fc-1b9154005c07'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Tax Identification Number'
                        id = '01f42a64-eba7-4892-a67b-398237e4ade2'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Value Added Tax Number'
                        id = '4f320d9b-4972-41ae-b337-88d499bb1ade'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'International Banking Account Number (IBAN)'
                        id = 'e7dc4711-11b7-4cb0-b88b-2c394a771f0e'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                )
            };
            Disabled                            = $False;
            DocumentIsPasswordProtected         = $False;
            DocumentIsUnsupported               = $False;
            Ensure                              = "Present";
            ExceptIfDocumentIsPasswordProtected = $False;
            ExceptIfDocumentIsUnsupported       = $False;
            ExceptIfProcessingLimitExceeded     = $False;
            Name                                = "General Data Protection Regulation (GDPR) High - ODB";
            Policy                              = "SSB AutoLabeling High Restrictions";
            ProcessingLimitExceeded             = $False;
            ReportSeverityLevel                 = "Low";
            TenantId                            = $OrganizationName;
            Workload                            = "Exchange";
        }
        SCAutoSensitivityLabelRule "SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) High - ODB-SharePoint"
        {
            ApplicationId                       = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint               = $ConfigurationData.NonNodeData.CertificateThumbprint;
            ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation {
                SensitiveInformation = @(
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Citizen''s Service (BSN) Number'
                        id = 'c5f54253-ef7e-44f6-a578-440ed67e946d'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Driver''s License Number'
                        id = '6247fbea-ab80-4be5-8233-308b7c031401'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Passport Number'
                        id = '61786727-bafd-45f6-94d9-888d815e228e'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Physical Addresses'
                        id = 'b3650e47-f2dc-4d29-a4fc-1b9154005c07'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Tax Identification Number'
                        id = '01f42a64-eba7-4892-a67b-398237e4ade2'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Value Added Tax Number'
                        id = '4f320d9b-4972-41ae-b337-88d499bb1ade'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'International Banking Account Number (IBAN)'
                        id = 'e7dc4711-11b7-4cb0-b88b-2c394a771f0e'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                )
            };
            Disabled                            = $False;
            DocumentIsPasswordProtected         = $False;
            DocumentIsUnsupported               = $False;
            Ensure                              = "Present";
            ExceptIfDocumentIsPasswordProtected = $False;
            ExceptIfDocumentIsUnsupported       = $False;
            ExceptIfProcessingLimitExceeded     = $False;
            Name                                = "General Data Protection Regulation (GDPR) High - ODB";
            Policy                              = "SSB AutoLabeling High Restrictions";
            ProcessingLimitExceeded             = $False;
            ReportSeverityLevel                 = "Low";
            TenantId                            = $OrganizationName;
            Workload                            = "SharePoint";
        }
        SCAutoSensitivityLabelRule "SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) High - ODB-OneDriveForBusiness"
        {
            ApplicationId                       = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint               = $ConfigurationData.NonNodeData.CertificateThumbprint;
            ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation {
                SensitiveInformation = @(
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Citizen''s Service (BSN) Number'
                        id = 'c5f54253-ef7e-44f6-a578-440ed67e946d'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Driver''s License Number'
                        id = '6247fbea-ab80-4be5-8233-308b7c031401'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Passport Number'
                        id = '61786727-bafd-45f6-94d9-888d815e228e'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Physical Addresses'
                        id = 'b3650e47-f2dc-4d29-a4fc-1b9154005c07'
                        maxconfidence = '100'
                        minconfidence = '75'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Tax Identification Number'
                        id = '01f42a64-eba7-4892-a67b-398237e4ade2'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'Netherlands Value Added Tax Number'
                        id = '4f320d9b-4972-41ae-b337-88d499bb1ade'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                    MSFT_SCDLPSensitiveInformation
                    {
                        name = 'International Banking Account Number (IBAN)'
                        id = 'e7dc4711-11b7-4cb0-b88b-2c394a771f0e'
                        maxconfidence = '100'
                        minconfidence = '85'
                        classifiertype = 'Content'
                        mincount = '51'
                        maxcount = '-1'
                    }
                )
            };
            Disabled                            = $False;
            DocumentIsPasswordProtected         = $False;
            DocumentIsUnsupported               = $False;
            Ensure                              = "Present";
            ExceptIfDocumentIsPasswordProtected = $False;
            ExceptIfDocumentIsUnsupported       = $False;
            ExceptIfProcessingLimitExceeded     = $False;
            Name                                = "General Data Protection Regulation (GDPR) High - ODB";
            Policy                              = "SSB AutoLabeling High Restrictions";
            ProcessingLimitExceeded             = $False;
            ReportSeverityLevel                 = "Low";
            TenantId                            = $OrganizationName;
            Workload                            = "OneDriveForBusiness";
        }
		
`

Verbose logs showing the problem

`DocumentIsPasswordProtected=False                                                                                                                                                                                                                                                       DocumentIsUnsupported=False                                                                                                                                                                                                                                                             ExceptIfDocumentIsPasswordProtected=False                                                                                                                                                                                                                                               ExceptIfDocumentIsUnsupported=False                                                                                                                                                                                                                                                     ExceptIfProcessingLimitExceeded=False                                                                                                                                                                                                                                                   Name=General Data Protection Regulation (GDPR) Enhanced-EXO                                                                                                                                                                                                                             Policy=SSB AutoLabeling Restrictions                                                                                                                                                                                                                                                    ProcessingLimitExceeded=False                                                                                                                                                                                                                                                           ReportSeverityLevel=Low                                                                                                                                                                                                                                                                 Verbose=True                                                                                                                                                                                                                                                                            Workload=Exchange                                                                                                                                                                                                                                                                       VERBOSE: [DESKTOP-UOVT50U]:                            [[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-Exchange] Returning precomputed version info: 3.4.0                                                               VERBOSE: [DESKTOP-UOVT50U]:                            [[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-Exchange] POST with -1-byte payload                                                                               VERBOSE: [DESKTOP-UOVT50U]:                            [[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-Exchange] Query 1 failed.                                                                                         VERBOSE: [DESKTOP-UOVT50U]:                            [[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-Exchange] Getting message from error object                                                                       |Microsoft.Exchange.Management.UnifiedPolicy.ErrorPredicateLocationSupportException|Using the 'HeaderMatchesPatterns' parameter is supported only for Exchange content. Either remove this parameter or turn on only the Exchange location.                                                 + CategoryInfo          : NotSpecified: (:) [], CimException
    + FullyQualifiedErrorId : [TimeStamp=Mon, 06 May 2024 13:17:46 GMT],Write-ErrorMessage
    + PSComputerName        : localhost

VERBOSE: [DESKTOP-UOVT50U]:                            [[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-Exchange] Flipping the parent policy to Mode back to TestWithoutNotifications while we create the rule
WARNING: [DESKTOP-UOVT50U]:                            [[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-Exchange] Any updates to auto labeling policy requires simulation to be restarted. Please use
Set-AutoSensitivityLabelPolicy to set StartSimulation to $true for changes to be reflected.
VERBOSE: [DESKTOP-UOVT50U]: LCM:  [ End    Set      ]  [[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-Exchange]  in 21.3180 seconds.
The PowerShell DSC resource '[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-Exchange' with SourceInfo 'C:\M365DSC\Export\SC\RWO-V-SC.ps1::887::3::SCAutoSensitivityLabelRule' threw one or more non-terminating errors
while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details.                                                                                                            + CategoryInfo          : InvalidOperation: (:) [], CimException                                                                                                                                                                                                                        + FullyQualifiedErrorId : NonTerminatingErrorFromProvider                                                                                                                                                                                                                               + PSComputerName        : localhost                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         VERBOSE: [DESKTOP-UOVT50U]: LCM:  [ Start  Resource ]  [[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-SharePoint]                                                                                                       VERBOSE: [DESKTOP-UOVT50U]: LCM:  [ Start  Test     ]  [[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-SharePoint]                                                                                                       VERBOSE: [DESKTOP-UOVT50U]:                            [[SCAutoSensitivityLabelRule]SCAutoSensitivityLabelRule-General Data Protection Regulation (GDPR) Enhanced-EXO-SharePoint] Importing the module MSFT_SCAutoSensitivityLabelRule in force mode.     

`

Environment Information + PowerShell Version

OsName               : Microsoft Windows 11 Pro
OsOperatingSystemSKU : 48
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage           : en-US
OsMuiLanguages       : {en-US, en-GB}

Name                           Value
----                           -----
PSVersion                      5.1.22621.2506
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.22621.2506
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@andikrueger andikrueger added Bug Something isn't working Security & Compliance Center V1.24.424.1 Version 1.24.424.1 labels May 6, 2024
@hvdbrink
Copy link
Author

hvdbrink commented May 7, 2024

Fixed this locally togother with @ykuijs by adjusting this on line 625 :

From

 $HeaderMatchesPatternsValue = @{}
if ($null -ne $HeaderMatchesPatterns -and $null -ne $HeaderMatchesPatterns.Name)
    {
        $HeaderMatchesPatternsValue.Add($HeaderMatchesPatterns.Name, $HeaderMatchesPatterns.Values)
    }

To :

if ($null -ne $HeaderMatchesPatterns -and $null -ne $HeaderMatchesPatterns.Name)
    {
        $HeaderMatchesPatternsValue = @{}
        $HeaderMatchesPatternsValue.Add($HeaderMatchesPatterns.Name, $HeaderMatchesPatterns.Values)
    }

Have to note when running this there is a notification that the min and maxconfidence is deprecated and will be replaced by confidencelevel

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.24.424.1 Version 1.24.424.1
Projects
None yet
Development

No branches or pull requests

2 participants