Report Error-Duplicate keys 'name' are not allowed in hash literals.
Description of the issue
New-M365DSCReportFromConfiguration -Type HTML -ConfigurationPath C:\M365\M365DSc-SC10062025.ps1 -OutputPath C:\M365\Report\M365DSc-SC10062025.html
There is a newer version of the 'Microsoft365DSC' module available on the gallery. To update the module and it's dependencies, run the following command: Update-M365DSCModule Error parsing configuration: At line:2610 char:25
-
name = @( -
~~~~
Duplicate keys 'name' are not allowed in hash literals. At C:\Program Files\WindowsPowerShell\Modules\DSCParser\2.0.0.17\Modules\DSCParser.psm1:472 char:9
-
throw "$($errorPrefix)Error parsing configuration: $parseErro ... -
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : OperationStopped: (Error parsing c... hash literals.:String) [], RuntimeException
- FullyQualifiedErrorId : Error parsing configuration: At line:2610 char:25
-
name = @( -
~~~~
Duplicate keys 'name' are not allowed in hash literals.
Microsoft 365 DSC Version
1.25.528.1
Which workloads are affected
Security & Compliance Center
The DSC configuration
New-M365DSCReportFromConfiguration -Type HTML -ConfigurationPath C:\M365\M365DSc-SC10062025.ps1 -OutputPath C:\M365\Report\M365DSc-SC10062025.html
Verbose logs showing the problem
Duplicate keys 'name' are not allowed in hash literals.
Environment Information + PowerShell Version
OsName : Microsoft Windows Server 2022 Datacenter
OsOperatingSystemSKU : DatacenterServerEdition
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 20348.1.amd64fre.fe_release.210507-1500
OsLanguage : en-US
OsMuiLanguages : {en-US}
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.20348.2849
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.2849
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
@Aussupport Can you share the part of the configuration where the error appears?
ContentContainsSensitiveInformation = MSFT_SCDLPContainsSensitiveInformation{
groups = MSFT_SCDLPContainsSensitiveInformationGroup{
operator = "Or"
labels = MSFT_SCDLPLabel{
name = @(
"Protected"
"Protected-Private"
"Protected-Commercial"
"Protected-Legal"
"Protected-Other"
)
id = @(
"c00a4903-f6b0-454a-8640-5a4dc7bd07ff"
"10ac1077-cbd9-4e91-8ead-ddcbcaf43cb8"
"c76c57e2-53c7-4f65-90c1-dbca2754a363"
"00319cda-4cf0-44c1-ad04-a52bf8f128df"
"0365abee-b922-4f3a-990d-0173ea38bb86"
)
type = @(
"Sensitivity"
"Sensitivity"
"Sensitivity"
"Sensitivity"
"Sensitivity"
)
name = @(
"Protected"
"Protected-Private"
"Protected-Commercial"
"Protected-Legal"
"Protected-Other"
)
id = @(
"c00a4903-f6b0-454a-8640-5a4dc7bd07ff"
"10ac1077-cbd9-4e91-8ead-ddcbcaf43cb8"
"c76c57e2-53c7-4f65-90c1-dbca2754a363"
"00319cda-4cf0-44c1-ad04-a52bf8f128df"
"0365abee-b922-4f3a-990d-0173ea38bb86"
)
type = @(
"Sensitivity"
"Sensitivity"
"Sensitivity"
"Sensitivity"
"Sensitivity"
)
id = @(
"c00a4903-f6b0-454a-8640-5a4dc7bd07ff"
"10ac1077-cbd9-4e91-8ead-ddcbcaf43cb8"
"c76c57e2-53c7-4f65-90c1-dbca2754a363"
"00319cda-4cf0-44c1-ad04-a52bf8f128df"
"0365abee-b922-4f3a-990d-0173ea38bb86"
)
type = @(
"Sensitivity"
"Sensitivity"
"Sensitivity"
"Sensitivity"
"Sensitivity"
)
name = @(
"Protected"
"Protected-Private"
"Protected-Commercial"
"Protected-Legal"
"Protected-Other"
)
id = @(
"c00a4903-f6b0-454a-8640-5a4dc7bd07ff"
"10ac1077-cbd9-4e91-8ead-ddcbcaf43cb8"
"c76c57e2-53c7-4f65-90c1-dbca2754a363"
"00319cda-4cf0-44c1-ad04-a52bf8f128df"
"0365abee-b922-4f3a-990d-0173ea38bb86"
)
type = @(
"Sensitivity"
"Sensitivity"
"Sensitivity"
"Sensitivity"
"Sensitivity"
)
name = @(
"Protected"
"Protected-Private"
"Protected-Commercial"
"Protected-Legal"
"Protected-Other"
)
id = @(
"c00a4903-f6b0-454a-8640-5a4dc7bd07ff"
"10ac1077-cbd9-4e91-8ead-ddcbcaf43cb8"
"c76c57e2-53c7-4f65-90c1-dbca2754a363"
"00319cda-4cf0-44c1-ad04-a52bf8f128df"
"0365abee-b922-4f3a-990d-0173ea38bb86"
)
type = @(
"Sensitivity"
"Sensitivity"
"Sensitivity"
"Sensitivity"
"Sensitivity"
)
}
name = "Default"
}
operator = "And"
After removing the duplicate, all sorted.
@Aussupport Thank you for the configuration, that helps a lot. I'll take a look at it later.
I get this as well - stops SCDLPComplianceRule from exporting to Excel
@Aussupport @FlattusBlastus How do I have to configure the compliance rule in Purview to get a similar export as you? Whatever I do, I am unable to populate the properties for the export. All I have is the information in the AdvancedRule property if I create an advanced one.
I believe this is because https://learn.microsoft.com/en-us/purview/dlp-policy-design#complex-rule-design says that they've overhauled the backend api management of the rules.
I'm going to close this issue since it seems that the backend was overhauled and previous configurations don't work anymore.
Please reopen. I updated to current. Still got the dupes.
@FlattusBlastus did you re-export the configuration? If no, does the new export still look the same?
@FlattusBlastus Any news? Otherwise I'll be closing it again.
I have the issue uniquely identified. All I can tell you publicly is that it involves case. In order to share more, I would have to send the info from my work email to a microsoft.com account. Better yet, via Teams. My org and MS share a NDA. In order to demonstrate, I'd have to show you some org work product and I just can't do that here. I like my job very much. I have tried asking my customer success rep to pass the info to Nik internally without revealing his internal email address to me but was also denied. I have the info thats needed but cant share it for all to see.
On Mon, Sep 15, 2025 at 1:05 AM Fabien Tschanz @.***> wrote:
FabienTschanz left a comment (microsoft/Microsoft365DSC#6152) https://github.com/microsoft/Microsoft365DSC/issues/6152#issuecomment-3290940308
@FlattusBlastus https://github.com/FlattusBlastus Any news? Otherwise I'll be closing it again.
— Reply to this email directly, view it on GitHub https://github.com/microsoft/Microsoft365DSC/issues/6152#issuecomment-3290940308, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASVVEUFTU7LQ7W5LZIYUWMT3SZXM3AVCNFSM6AAAAAB66YIZVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTEOJQHE2DAMZQHA . You are receiving this because you were mentioned.Message ID: @.***>
@FlattusBlastus I passed the info to Nik, hope that he'll respond. Unfortunately, I don't work for Microsoft, meaning I probably can't help anymore, except if you can describe what the process is and how I get there without sharing any confidential information. Is that really not possible?
How were these config generated in the first place. The above example seems incorrect, this is not how the resource's schema is being defined.
@FlattusBlastus Do you have any information that can help us in investigating? Otherwise we'll have to close it.
Closing this one as stale. If the issue persists, feel free to reopen it.