Skip to content

EXOMailboxAutoReplyConfiguration: Export fails on certain users #5998

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

Open
ararag opened this issue Apr 8, 2025 · 1 comment · May be fixed by #6012
Open

EXOMailboxAutoReplyConfiguration: Export fails on certain users #5998

ararag opened this issue Apr 8, 2025 · 1 comment · May be fixed by #6012
Labels
Bug Something isn't working Exchange Online

Comments

@ararag
Copy link

ararag commented Apr 8, 2025

Description of the issue

Export-M365DSCConfiguration -Components @("EXOMailboxAutoReplyConfiguration") -ApplicationId $ApplicationId -CertificateThumbprint $CertificateThumbprint -TenantId $TenantId -Path $Path -Filename $Filename

This fails on some users. Getting the error:
Error Log created at {file://C:/Microsoft365DSC/12516-M365DSC-ErrorLog.log}

Microsoft 365 DSC Version

1.25.402.1

Which workloads are affected

Exchange Online

The DSC configuration

Verbose logs showing the problem

[2025.04.08 08.51.38]
{InvalidData}
System.Management.Automation.ParameterBindingArgumentTransformationException: Cannot process argument transformation on parameter 'String'. Cannot convert value to type System.String. ---> System.Management.Automation.ArgumentTransformationMetadataException: Cannot convert value to type System.String. ---> System.Management.Automation.PSInvalidCastException: Cannot convert value to type System.String.
   at System.Management.Automation.ArgumentTypeConverterAttribute.Transform(EngineIntrinsics engineIntrinsics, Object inputData, Boolean bindingParameters, Boolean bindingScriptCmdlet)
   --- End of inner exception stack trace ---
   at System.Management.Automation.ArgumentTypeConverterAttribute.Transform(EngineIntrinsics engineIntrinsics, Object inputData, Boolean bindingParameters, Boolean bindingScriptCmdlet)
   at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags)
   --- End of inner exception stack trace ---
   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
   at Get-M365DSCExportContentForResource(Closure , FunctionContext )
   at System.Management.Automation.PSScriptCmdlet.RunClause(Action`1 clause, Object dollarUnderbar, Object inputToProcess)
   at System.Management.Automation.PSScriptCmdlet.DoEndProcessing()
   at System.Management.Automation.CommandProcessorBase.Complete()
"Error during Export:"
at Get-M365DSCExportContentForResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.402.1\Modules\M365DSCUtil.psm1: line 3844
at Export-TargetResource, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.402.1\DSCResources\MSFT_EXOMailboxAutoReplyConfiguration\MSFT_EXOMailboxAutoReplyConfiguration.psm1: line 553
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.402.1\Modules\M365DSCReverse.psm1: line 682
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\1.25.402.1\Modules\M365DSCUtil.psm1: line 1495
at <ScriptBlock>, C:\Microsoft365DSC\M365DSC_test.ps1: line 8
at <ScriptBlock>, <No file>: line 1
TenantId: <redacted>.onmicrosoft.com

Environment Information + PowerShell Version

OsName               : Microsoft Windows Server 2025 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 26100.1.amd64fre.ge_release.240331-1435
OsLanguage           : en-US
OsMuiLanguages       : {en-US}

Name                           Value
----                           -----
PSVersion                      5.1.26100.2161
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.26100.2161
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
@andikrueger andikrueger added Bug Something isn't working Exchange Online labels Apr 9, 2025
@Harshit057
Copy link

From the logs you've provided, it appears the Export-M365DSCConfiguration command fails during the extraction of the EXOMailboxAutoReplyConfiguration for some users due to a type conversion error: ** Cannot process argument transformation on parameter 'String'. Cannot convert the value to type System.String.**
This typically happens when a mailbox property (e.g., an auto-reply message or internal/external recipient setting) is null, not a string, or contains unexpected formatting that Microsoft365DSC fails to handle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Exchange Online
Projects
None yet
3 participants