Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Export-M365DSCConfiguration creates invalid EXOFocusedInbox resources

Open pluethi1 opened this issue 1 year ago • 4 comments

Description of the issue

When exporting a tenant config using the workload for Exchange online, it creates EXOFocusedInbox resources that cannot be compiled to a .MOF file:

Microsoft365DSC\EXOFocusedInbox : At least one of the values 'Absent' is not supported or valid for property 'Ensure'
on class 'EXOFocusedInbox'. Please specify only supported values:
Present.
At C:\dsc\export\Configuration.ps1:24145 char:9
+         EXOFocusedInbox "EXOFocusedInbox-[REDACTED]
+         ~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnsupportedValueForProperty,Microsoft365DSC\EXOFocusedInbox

Microsoft 365 DSC Version

1.25.611.1

Which workloads are affected

Exchange Online

The DSC configuration

EXOFocusedInbox "EXOFocusedInbox-[REDACTED]"
        {
            ApplicationId         = $ConfigurationData.NonNodeData.ApplicationId;
            CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
            Ensure                = "Absent";
            Identity              = "[REDACTED]";
            TenantId              = $OrganizationName;
        }

Verbose logs showing the problem

Microsoft365DSC\EXOFocusedInbox : At least one of the values 'Absent' is not supported or valid for property 'Ensure'
on class 'EXOFocusedInbox'. Please specify only supported values:
Present.
At C:\dsc\export\Configuration.ps1:24145 char:9
+         EXOFocusedInbox "EXOFocusedInbox-[REDACTED]
+         ~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Write-Error], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnsupportedValueForProperty,Microsoft365DSC\EXOFocusedInbox

Environment Information + PowerShell Version

OsName               : Microsoft Windows 10 Pro
OsOperatingSystemSKU : 48
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Name                           Value
----                           -----
PSVersion                      5.1.19041.5848
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.5848
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

pluethi1 avatar Jun 17 '25 08:06 pluethi1

@ricmestre Didn't you mention once something about this resource?

FabienTschanz avatar Jun 26 '25 18:06 FabienTschanz

@FabienTschanz Maybe? Most likely wasn't me since I exclude data plane resources from my solution such as this one, but this could be because of a couple reasons which could also happen to other resources.

Either the app registration doesn't have the right permissions assigned and therefore cannot read that type of resource, if it can and there are other EXOFocusedInbox resources which don't appear as absent then it could also be some fart in the network while doing the export which could not export that specific identity while the others worked, so just a matter of running the export once again, or there is some specific problem with that focused inbox where it has been identified as one but returns $NULL if you inspect it.

If it's the latter then I'd investigate why does that focused inbox return $NULL, but at first glance from the possibilities here doesn't seem a problem that can be fixed in M365DSC.

ricmestre avatar Jun 27 '25 08:06 ricmestre

@pluethi1 How many focused inboxes did you export? And what happens if you try to fetch the specific entity that failed manually?

Get-FocusedInbox -Identity <UserPrincipalName>

FabienTschanz avatar Jun 27 '25 20:06 FabienTschanz

@FabienTschanz Nevermind I just realised the export never created that value it was me when I was testing something else. 🤦

I'll consider this resolved...

pluethi1 avatar Jul 03 '25 14:07 pluethi1