[SC]Sensitivity Label - External Access Issue
Description of the issue
When exporting Sensitivity labels the export changes the output of SiteAndGroupProtectionAllowAccessToGuestUsers and SiteAndGroupProtectionAllowEmailFromGuestUsers. During the Get-Targetresource the output is still correct , but it exports as seen in the DSC configuration
$protectgroup Key Value
privacy unspecified
allowemailfromguestusers false
allowaccesstoguestusers true
disabled false
Microsoft 365 DSC Version
V1,23,1011,1
Which workloads are affected
Security & Compliance Center
The DSC configuration
SCSensitivityLabel "SCSensitivityLabel-Niet openbaar"
{
AdvancedSettings = @(
MSFT_SCLabelSetting
{
Key = 'color'
Value = '#EAA300'
}
MSFT_SCLabelSetting
{
Key = 'isparent'
Value = 'False'
}
);
ApplyContentMarkingHeaderAlignment = "Center";
ApplyContentMarkingHeaderEnabled = $True;
ApplyContentMarkingHeaderFontColor = "#000000";
ApplyContentMarkingHeaderFontSize = "10";
ApplyContentMarkingHeaderMargin = "5";
ApplyContentMarkingHeaderText = "Niet openbaar";
Comment = "Niet openbare gegevens zonder expliciete rubricering – standaard label";
ContentType = @("File, Email","Site, UnifiedGroup","Teamwork");
Credential = $Credscredential;
DisplayName = "Niet openbaar";
Ensure = "Present";
LocaleSettings = @(
MSFT_SCLabelLocaleSettings
{
LocaleKey = 'displayName'
LabelSettings = @(
MSFT_SCLabelSetting
{
Key = 'default'
Value = 'Niet openbaar'
}
)
}
MSFT_SCLabelLocaleSettings
{
LocaleKey = 'tooltip'
LabelSettings = @(
MSFT_SCLabelSetting
{
Key = 'default'
Value = 'Text'
}
)
}
);
Name = "Label-02";
Priority = 7;
SiteAndGroupExternalSharingControlType = "Disabled";
SiteAndGroupProtectionAllowAccessToGuestUsers = $False;
SiteAndGroupProtectionAllowEmailFromGuestUsers = $True;
SiteAndGroupProtectionAllowFullAccess = $False;
SiteAndGroupProtectionAllowLimitedAccess = $False;
SiteAndGroupProtectionBlockAccess = $False;
SiteAndGroupProtectionEnabled = $True;
SiteAndGroupProtectionPrivacy = "unspecified";
Tooltip = "Text";
}
Verbose logs showing the problem
No response
Environment Information + PowerShell Version
OsName : Microsoft Windows 10 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture : 64 bits
WindowsVersion : 2009
WindowsBuildLabEx : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage : nl-NL
OsMuiLanguages : {nl-NL}
$entry = $protectgroup | Where-Object -FilterScript { $_.Key -eq 'allowaccesstoguestusers' }
if ($null -ne $entry)
{
$siteAndGroupAccessToGuestUsersValue = -not [Boolean]::Parse($entry.Value)
}
$entry = $protectgroup | Where-Object -FilterScript { $_.Key -eq 'allowemailfromguestusers' }
if ($null -ne $entry)
{
$siteAndGroupAllowEmailFromGuestUsers = -not [Boolean]::Parse($entry.Value)
}
the -not should be removed, since it changes a true to false and a false to true in the export.