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

EXOMessageClassification: On first attempt policy is created but outputs error message #4877

Closed
ricmestre opened this issue Jul 15, 2024 · 0 comments · Fixed by #4878 or #4902
Closed

Comments

@ricmestre
Copy link
Contributor

Description of the issue

If policy doesn't exist yet on tenant then when trying to create it an error message appears but policy is created without issues, any subsequent changes to the policy also work without issues.

Issue is caused by trying to retrieve the policy by name before existing and the cmdlet Get-MessageClassification spits that error message, I'll raise a PR to fix this.

Microsoft 365 DSC Version

1.24.710.3

Which workloads are affected

Exchange Online

The DSC configuration

EXOMessageClassification "EXOMessageClassification-EXOMessageClassification_1"
        {
            Credential                  = $CredsCredential;
            DisplayName                 = "EXOMessageClassification_1";
            DisplayPrecedence           = "Highest";
            Ensure                      = "Present";
            Identity                    = "EXOMessageClassification_1";
            Name                        = "EXOMessageClassification_1";
            PermissionMenuVisible       = $True;
            RecipientDescription        = "Shown to recipients";
            RetainClassificationEnabled = $True;
            SenderDescription           = "Shown to senders";
        }

Verbose logs showing the problem

Setting configuration of Message Classification for EXOMessageClassification_1 Ex6F930
4|Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|The operation couldn't be performed because object 'EXOMessageClassification_1' couldn't be found on 'PR3P195A06DC006.EURP195A006.PROD.OUTLOOK.COM'.
+ CategoryInfo          : NotSpecified: (:) [], CimException
+ FullyQualifiedErrorId : [Server=DU2P195MB2466,RequestId=51e7e140-0733-181e-1630-1d324bfe6955,TimeStamp=Mon, 15 Jul 2024 12:09:30 GMT],Write-ErrorMessage
+ PSComputerName        : localhost

Environment Information + PowerShell Version

Win11 / PS5.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant