IntuneAppConfigurationDevicePolicy - Fails to export App Configuration Policy using XML settings
Description of the issue
When capturing Intune resources with export-m365dscconifguration one resource is failing under the "Extracting [IntuneAppConfigurationDevicePolicy] using {CertificateThumbprint}" stage.
This one resource in Intune is using XML settings rather than the configuration designer.
Looks like M365DSC is expecting settings property to have entries where as policies using XML instead make use of "encodedSettingXml" property under "additionalProperties".
Example below of object converted to JSON with empty array for settings property/encodedSettingXml.
PS C:\Temp> get-mgbetadeviceappmanagementmobileappconfiguration -ManagedDeviceMobileAppConfigurationId a83f69bc-179e-419e-b8e8-d8cb08a797f7 | convertto-json -depth 20 { "Assignments": null, "CreatedDateTime": "2026-10-01T10:59:05.0269207Z", "Description": "", "DeviceStatusSummary": { "ConfigurationVersion": null, "ConflictCount": null, "ErrorCount": null, "FailedCount": null, "Id": null, "LastUpdateDateTime": null, "NotApplicableCount": null, "NotApplicablePlatformCount": null, "PendingCount": null, "SuccessCount": null }, "DeviceStatuses": null, "DisplayName": "pol-intune-ios-edgeAppConfig", "Id": "a83f69bc-179e-419e-b8e8-d8cb08a797f7", "LastModifiedDateTime": "2026-10-01T13:03:51.4706854Z", "RoleScopeTagIds": [ "0" ], "TargetedMobileApps": [ "86030326-0caf-4fa5-b847-785071070a70" ], "UserStatusSummary": { "ConfigurationVersion": null, "ConflictCount": null, "ErrorCount": null, "FailedCount": null, "Id": null, "LastUpdateDateTime": null, "NotApplicableCount": null, "PendingCount": null, "SuccessCount": null }, "UserStatuses": null, "Version": 3, "AdditionalProperties": { "@odata.context": "https://graph.microsoft.com/beta/$metadata#deviceAppManagement/mobileAppConfigurations/$entity", "@odata.type": "#microsoft.graph.iosMobileAppConfiguration", "encodedSettingXml": "PGRpY3Q+CiAgICA8a2V5PlVSTEJsb2NrbGlzdDwva2V5PgogICAgPGFycmF5PgogICAgICAgIDxzdHJpbmc+Kjwvc3RyaW5nPgogICAgPC9hcnJheT4KCiAgICA8a2V5PlVSTEFsbG93bGlzdDwva2V5PgogICAgPGFycmF5PgogICAgICAgIDxzdHJpbmc+ZWRnZTovLyo8L3N0cmluZz4KICAgICAgICA8c3RyaW5nPmludGVybmF0aW9uYWxzb3MuY29tPC9zdHJpbmc+CiAgICAgICAgPHN0cmluZz4qLmludGVybmF0aW9uYWxzb3MuY29tPC9zdHJpbmc+CiAgICA8L2FycmF5Pgo8L2RpY3Q+", "settings": [] } }
Microsoft 365 DSC Version
2.26.1028.1
Which workloads are affected
Intune
The DSC configuration
Export-M365DSCConfiguration `
-ApplicationId "$(appID)" `
-TenantId "$(tenantDomain)" `
-CertificateThumbprint "$(certificateThumbprint)" `
-Workloads @(
"INTUNE"
) `
-Mode Full `
-Validate `
-Path $snapshotPath `
-FileName "devTenantSnapshot.ps1" `
-ConfigurationName "DevTenantSnapshot" `
-WithStatistics
Verbose logs showing the problem
Error Log created at {file://C:/Users/VSSADM~1/AppData/Local/Temp/3052-M365DSC-ErrorLog.log}
|---[5/7] pol-intune-ios-edgeAppConfig❌
An error occurred while exporting resource {IntuneAppConfigurationDevicePolicy}: Exception calling "SetValue" with "2" argument(s): "The argument is null, empty, or an element of the argument collection contains a null value. Supply a collection that does not contain any null values and then try the command again."
{NotSpecified}
System.Management.Automation.MethodInvocationException: Exception calling "SetValue" with "2" argument(s): "The argument is null, empty, or an element of the argument collection contains a null value. Supply a collection that does not contain any null values and then try the command again."
---> System.Management.Automation.ValidationMetadataException: The argument is null, empty, or an element of the argument collection contains a null value. Supply a collection that does not contain any null values and then try the command again.
at System.Management.Automation.ValidateNotNullOrAttributeBase.Validate(Object arguments, EngineIntrinsics engineIntrinsics)
at System.Management.Automation.Internal.ClassOps.ValidateSetProperty(Type type, String propertyName, Object value)
at IntuneAppConfigurationDevicePolicy.set_Settings(MSFT_MicrosoftGraphappConfigurationSettingItem[])
at InvokeStub_IntuneAppConfigurationDevicePolicy.set_Settings(Object, Object, IntPtr*)
at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
"Error retrieving data:"
at _SetProperty, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\2.26.1028.1\Classes\_Shared.psm1: line 434
at FromHashtable, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\2.26.1028.1\Classes\_Shared.psm1: line 852
at AsResult, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\2.26.1028.1\Classes\Part06.psm1: line 14091
at Get, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\2.26.1028.1\Classes\Part06.psm1: line 13819
at GetForExport, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\2.26.1028.1\Classes\_Shared.psm1: line 1222
at Export, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\2.26.1028.1\Classes\Part06.psm1: line 14013
at Invoke-M365DSCResourceMethod, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\2.26.1028.1\Classes\_Shared.psm1: line 1609
at <ScriptBlock>, <No file>: line 136
at Start-M365DSCConfigurationExtract, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\2.26.1028.1\Modules\M365DSCReverse.psm1: line 1071
at Export-M365DSCConfiguration, C:\Program Files\WindowsPowerShell\Modules\Microsoft365DSC\2.26.1028.1\Modules\M365DSCExportUtil.psm1: line 510
at <ScriptBlock>, D:\a\_temp\4c6ebdbe-ae63-4323-b199-696636a1c799.ps1: line 22
at <ScriptBlock>, <No file>: line 1
Environment Information + PowerShell Version