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

[SCAutoSensitivityLabelPolicy] SharePoint and OneDrive locations do not support a Mode value of Enabled, that has to be TestWithoutNotifications #4990

Closed
ykuijs opened this issue Aug 27, 2024 · 1 comment · Fixed by #4993 or #4998
Assignees
Labels

Comments

@ykuijs
Copy link
Member

ykuijs commented Aug 27, 2024

Description of the issue

When using the SCAutoSensitivityLabelPolicy with either the SharePointLocation or the OneDriveLocation property (or both), you cannot specify a value of Enable for the Mode property. That has to be TestWithoutNotifications in those cases.

Microsoft 365 DSC Version

DEV

Which workloads are affected

Security & Compliance Center

The DSC configuration

SCAutoSensitivityLabelPolicy "MyPolicy"
{
    ApplySensitivityLabel = "MyLabel"
    Comment               = "MyPolicy"
    Ensure                = "Present"
    ExchangeLocation      = @("All")
    Mode                  = "Enable"
    Name                  = "MyPolicy"
    OneDriveLocation      = @("All")
    SharePointLocation    = @("All")
}

Verbose logs showing the problem

PS C:\> New-AutoSensitivityLabelPolicy -Name "GlobalPolicy" -Comment "Primary policy" -SharePointLocation "ALL" -OneDriveLocation "ALL" -Mode Enable -ApplySensitivityLabel "MyLabel"
Write-ErrorMessage : |Microsoft.Exchange.Management.UnifiedPolicy.ModeNotSupportedByMipCmdletForGivenWorkloadException|Mode 
Enable isn't supported for this cmdlet for the SharePoint locations.
At C:\Users\USER\AppData\Local\Temp\tmpEXO_pynmcqkh.y0n\tmpEXO_pynmcqkh.y0n.psm1:1205 char:13
+             Write-ErrorMessage $ErrorObject
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AutoSensitivityLabelPolicy], ModeNotSupporte...rkloadException
    + FullyQualifiedErrorId : [TimeStamp=Tue, 27 Aug 2024 08:13:13 GMT],Write-ErrorMessage

Environment Information + PowerShell Version

N/A
@ykuijs ykuijs added Bug Something isn't working Security & Compliance Center labels Aug 27, 2024
@ykuijs ykuijs self-assigned this Aug 27, 2024
@ykuijs
Copy link
Member Author

ykuijs commented Aug 27, 2024

Working on it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant