Assert-M365DSCBlueprint: Severity level issue when using json
YenNantes opened this issue · 1 comments
YenNantes commented
Description of the issue
It is mentioned on the BluePrint article (https://microsoft365dsc.com/user-guide/advanced/create-blueprint/) that it is possible to add a severity level for each resource property. If you add a severity as described on this article and try exporting the result to json, this severity is not displayed on the json.
Microsoft 365 DSC Version
1.24.424.1
Which workloads are affected
other
The DSC configuration
# Generated with Microsoft365DSC version 1.23.1220.1orig
# For additional information on how to use Microsoft365DSC, please visit https://aka.ms/M365DSC
param (
)
Configuration M365TenantConfig
{
param (
)
$OrganizationName = $ConfigurationData.NonNodeData.OrganizationName
Import-DscResource -ModuleName 'Microsoft365DSC' -ModuleVersion '1.23.1220.1'
Node localhost
{
AADAuthenticationContextClassReference "AADAuthenticationContextClassReference-Require Trusted Endpoint"
{
DisplayName = "Require Trusted Endpoint"; ### L3|High
Ensure = "Present"; ### L3|High
Id = "c1";
IsAvailable = $True;
}
AADAuthenticationContextClassReference "AADAuthenticationContextClassReference-Require MFA"
{
DisplayName = "Require MFA"; ### L3|High
Ensure = "Present"; ### L3|High
Id = "c2";
IsAvailable = $True;
}
AADAuthenticationContextClassReference "AADAuthenticationContextClassReference-Require re-authenticate every one hour"
{
DisplayName = "Require re-authenticate every one hour"; ### L3|High
Ensure = "Present"; ### L3|High
Id = "c3";
IsAvailable = $True;
}
}
}
M365TenantConfig -ConfigurationData .\ConfigurationData.psd1
Verbose logs showing the problem
Json outcome:
[
{
"ResourceName": "AADAuthenticationContextClassReference",
"Key": [
"Id"
],
"KeyValue": "c3",
"Properties": [
{
"ValueInDestination": "Present",
"ParameterName": "_IsInConfiguration_",
"ValueInSource": "Absent"
}
],
"ResourceInstanceName": "AADAuthenticationContextClassReference-Require re-authenticate every one hour"
}
]
Environment Information + PowerShell Version
No response
YenNantes commented
Forget about it, I finally found that it was due to some special chars on my baseline file.
It is working now.