Microsoft365DSC icon indicating copy to clipboard operation
Microsoft365DSC copied to clipboard

Test-TargetResource crashes for several EXO-related modules in release 1.21.217.1

Open EricHindrichsen opened this issue 5 years ago • 3 comments

Details of the scenario you tried and the problem that is occurring

We updated our working DSC code from release 1.21.203.1 to release 1.21.217.1 without changing our configs. Suddenly, the following modules crash during a Test-TargetResource run:

  • MSFT_O365AdminAuditLogConfig
  • MSFT_SCFilePlanPropertyAuthority
  • MSFT_EXOAntiPhishPolicy
  • MSFT_EXOAcceptedDomain

They all crash with the same error message. One example for EXOAcceptedDomain is shown below. For now, we've reverted back to release 1.21.203.1 until this is fixed.

Verbose logs showing the problem

2021-02-18T15:43:21.1985827Z MIResult: 1 2021-02-18T15:43:21.2020106Z Error Message: PowerShell DSC resource MSFT_EXOAcceptedDomain failed to execute Test-TargetResource functionality with error message: One or more errors occurred. 2021-02-18T15:43:21.2067449Z Message ID: ProviderOperationExecutionFailure 2021-02-18T15:43:21.2089842Z Error Category: 7 2021-02-18T15:43:21.2110212Z Error Code: 1 2021-02-18T15:43:21.2140609Z Error Type: MIJob {D6D66387-71FF-11EB-B1B2-00155D000403} : 2021-02-18T15:43:21.2166356Z Message One or more errors occurred. 2021-02-18T15:43:21.2188295Z HResult -2146233087 2021-02-18T15:43:21.2253777Z StackTrack at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input) 2021-02-18T15:43:21.2276462Z at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke) 2021-02-18T15:43:21.2292877Z at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync) 2021-02-18T15:43:21.2315573Z at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings) 2021-02-18T15:43:21.2347497Z at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection1 input, PSDataCollection1 output, PSInvocationSettings settings) 2021-02-18T15:43:21.2505012Z at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings) 2021-02-18T15:43:21.2534737Z at Microsoft.PowerShell.DesiredStateConfiguration.Internal.ResourceProviderAdapter.ExecuteCommand(PowerShell powerShell, ResourceModuleInfo resInfo, String operationCmd, List1 acceptedProperties, CimInstance nonResourcePropeties, CimInstance resourceConfiguration, LCMDebugMode debugMode, PSInvocationSettings pSInvocationSettings, UInt32& resultStatusHandle, Collection1& result, ErrorRecord& errorRecord, PSModuleInfo localRunSpaceModuleInfo)Job {D6D66387-71FF-11EB-B1B2-00155D000403} :

Suggested solution to the issue

Since this issue started after M365DSC updated the ExchangeOnlineManagement module being used from 2.0.3 to 2.0.4 and the affected modules seem to rely on that dependency please consider downgrading back to 2.0.3.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

# insert configuration here
EXOAcceptedDomain 9f215e0f-63f2-4a36-8f95-25e15012e1d8
        {
            DomainType           = "Authoritative";
            Ensure               = "Present";
            GlobalAdminAccount   = $Credsglobaladmin;
            Identity             = "$OrganizationName";
            MatchSubDomains      = $False;
            OutboundOnly         = $False;
        }

The operating system the target node is running

Azure Pipelines with agent specification "windows-2019".

Version of the DSC module that was used ('dev' if using current dev branch)

1.21.217.1

EricHindrichsen avatar Feb 18 '21 17:02 EricHindrichsen

I'm having the same problem. Also using 1.21.217.1

ararag avatar Feb 24 '21 09:02 ararag

Also crashing with MSFT_SCComplianceSearch:

Error: "PowerShell DSC resource MSFT_SCComplianceSearch failed to execute Test-TargetResource functionality with error message : The response content cannot be parsed because the Internet Explorer engine is not available, or Internet Explorer's f irst-launch configuration is not complete. Specify the UseBasicParsing parameter and try again."

The MSFT_EXOAcceptedDomain gives me another error message: "PowerShell DSC resource MSFT_EXOAcceptedDomain failed to execute Test-TargetResource functionality with error message: Cannot bind argument to parameter 'CertificateThumbprint' because it is an empty string."

ararag avatar Feb 24 '21 10:02 ararag

With release 1.21.224.1 reverting back to ExchangeOnlineManagement 2.0.3 the error messages are gone now, thank you! I'll close the issue.

@ararag The additional issues you mentioned sound like unrelated problems to me. Please open separate issue reports for each problem so they can be investigated and tracked correctly.

EricHindrichsen avatar Feb 25 '21 08:02 EricHindrichsen