Closed meklulose closed 1 year ago
Could you run a test in a plain powershell session? The error description looks like an issue with an Intune resource.
@William-Francillette could you have a look at this within #3309
@meklulose , could you share more information about the policy you are trying to export please?
The IntuneSettingCatalogCustomPolicyWindows10 is very generic and to troubleshoot the issue I would need to know which setting is configured in your policy
@William-Francillette I get the the same error when running in plain PowerShell session. It always fails when trying to extract "Microsoft Edge (EDM) Configuration Profile"
Can you send the exact settings configured in your policy please? They are a few different setting types and would like to reproduce the error on my side
@William-Francillette Please see the following screenshot
Thanks, that's perfect - I'll have a look at it tonight
@meklulose, I was able to export the resource, compile it, test it without drift and update it, using those settings in the screenshot - I've added the export below
Could you share more trace of the error please as the issue could be external to the resource itself
Thanks
IntuneSettingCatalogCustomPolicyWindows10 "IntuneSettingCatalogCustomPolicyWindows10-4e300eed-1d37-493e-a680-12988874587f"
{
ApplicationId = $ConfigurationData.NonNodeData.ApplicationId;
Assignments = @(
MSFT_DeviceManagementConfigurationPolicyAssignments{
deviceAndAppManagementAssignmentFilterType = 'none'
dataType = '#microsoft.graph.allDevicesAssignmentTarget'
}
);
CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint;
Description = "";
Ensure = "Present";
Id = "4e300eed-1d37-493e-a680-12988874587f";
Name = "Setting Catalog Raw";
Platforms = "windows10";
Settings = @(
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'device_vendor_msft_policy_config_abovelock_allowcortanaabovelock_1'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_abovelock_allowcortanaabovelock'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
SettingDefinitionId = 'device_vendor_msft_policy_config_applicationdefaults_defaultassociationsconfiguration'
simpleSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationSimpleSettingValue{
odataType = '#microsoft.graph.deviceManagementConfigurationStringSettingValue'
StringValue = ''
}
odataType = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'device_vendor_msft_policy_config_applicationdefaults_enableappurihandlers_1'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_applicationdefaults_enableappurihandlers'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'device_vendor_msft_policy_config_defender_allowarchivescanning_1'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_defender_allowarchivescanning'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'device_vendor_msft_policy_config_defender_allowbehaviormonitoring_1'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_defender_allowbehaviormonitoring'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'device_vendor_msft_policy_config_defender_allowcloudprotection_1'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_defender_allowcloudprotection'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Children = @(
MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
SettingDefinitionId = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_managedfavorites_managedfavorites'
simpleSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationSimpleSettingValue{
odataType = '#microsoft.graph.deviceManagementConfigurationStringSettingValue'
StringValue = 'test'
}
odataType = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance'
}
)
Value = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_managedfavorites_1'
}
SettingDefinitionId = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_managedfavorites'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Children = @(
MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_internetexplorerintegrationlevel_internetexplorerintegrationlevel_1'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_internetexplorerintegrationlevel_internetexplorerintegrationlevel'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
)
Value = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_internetexplorerintegrationlevel_1'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_internetexplorerintegrationlevel'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_backgroundmodeenabled_0'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_backgroundmodeenabled'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_backgroundmodeenabled_0'
}
SettingDefinitionId = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_backgroundmodeenabled'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Children = @(
MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
SettingDefinitionId = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge~extensions_extensioninstallallowlist_extensioninstallallowlistdesc'
simpleSettingCollectionValue = @(
MSFT_MicrosoftGraphDeviceManagementConfigurationSimpleSettingValue{
odataType = '#microsoft.graph.deviceManagementConfigurationStringSettingValue'
StringValue = '*'
}
)
odataType = '#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstance'
}
)
Value = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge~extensions_extensioninstallallowlist_1'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge~extensions_extensioninstallallowlist'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Children = @(
MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
SettingDefinitionId = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge~extensions_extensioninstallblocklist_extensioninstallblocklistdesc'
simpleSettingCollectionValue = @(
MSFT_MicrosoftGraphDeviceManagementConfigurationSimpleSettingValue{
odataType = '#microsoft.graph.deviceManagementConfigurationStringSettingValue'
StringValue = '123456789456'
}
)
odataType = '#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstance'
}
)
Value = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge~extensions_extensioninstallblocklist_1'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge~extensions_extensioninstallblocklist'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'device_vendor_msft_policy_config_microsoft_edgev80diff~policy~microsoft_edge_hidefirstrunexperience_1'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_microsoft_edgev80diff~policy~microsoft_edge_hidefirstrunexperience'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'device_vendor_msft_policy_config_microsoft_edgev99~policy~microsoft_edge_hubssidebarenabled_0'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_microsoft_edgev99~policy~microsoft_edge_hubssidebarenabled'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'device_vendor_msft_policy_config_microsoft_edgev88~policy~microsoft_edge_recommended~performance_recommended_startupboostenabled_recommended_0'
}
SettingDefinitionId = 'device_vendor_msft_policy_config_microsoft_edgev88~policy~microsoft_edge_recommended~performance_recommended_startupboostenabled_recommended'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'user_vendor_msft_policy_config_microsoft_edgev88~policy~microsoft_edge_recommended~performance_recommended_startupboostenabled_recommended_0'
}
SettingDefinitionId = 'user_vendor_msft_policy_config_microsoft_edgev88~policy~microsoft_edge_recommended~performance_recommended_startupboostenabled_recommended'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Children = @(
MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_recommended~startup_recommended_restoreonstartup_recommended_restoreonstartup_1'
}
SettingDefinitionId = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_recommended~startup_recommended_restoreonstartup_recommended_restoreonstartup'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
)
Value = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_recommended~startup_recommended_restoreonstartup_recommended_1'
}
SettingDefinitionId = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_recommended~startup_recommended_restoreonstartup_recommended'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Children = @(
MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
SettingDefinitionId = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_recommended~startup_recommended_homepagelocation_recommended_homepagelocation'
simpleSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationSimpleSettingValue{
odataType = '#microsoft.graph.deviceManagementConfigurationStringSettingValue'
StringValue = 'test.com'
}
odataType = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance'
}
)
Value = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_recommended~startup_recommended_homepagelocation_recommended_1'
}
SettingDefinitionId = 'user_vendor_msft_policy_config_microsoft_edge~policy~microsoft_edge_recommended~startup_recommended_homepagelocation_recommended'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{
SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Children = @(
MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
Value = 'user_vendor_msft_policy_config_microsoft_edgev79diff~policy~microsoft_edge_recommended~startup_recommended_newtabpagesetfeedtype_recommended_newtabpagesetfeedtype_0'
}
SettingDefinitionId = 'user_vendor_msft_policy_config_microsoft_edgev79diff~policy~microsoft_edge_recommended~startup_recommended_newtabpagesetfeedtype_recommended_newtabpagesetfeedtype'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
)
Value = 'user_vendor_msft_policy_config_microsoft_edgev79diff~policy~microsoft_edge_recommended~startup_recommended_newtabpagesetfeedtype_recommended_1'
}
SettingDefinitionId = 'user_vendor_msft_policy_config_microsoft_edgev79diff~policy~microsoft_edge_recommended~startup_recommended_newtabpagesetfeedtype_recommended'
odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
}
}
);
Technologies = "mdm";
TenantId = $OrganizationName;
}
I tried using certificate thumbprint and client secret, both authentications worked
Can you ensure your service principal has at least
"DeviceManagementConfiguration.Read.All"
and if update needed "DeviceManagementConfiguration.ReadWrite.All"
@William-Francillette How would I get more detailed tracing? My event viewer also shows the same error message
`-
`
The problem might be the policy named "Microsoft Edge Configuration Profile" is there a way I can run the script but exclude it from trying to extract this policy? Thanks for your help!
The display name is not a key word so it should be fine
The code below should allow you to display Get-TargetResource output - Could you modify any variable value such as \<variable> and send us the output please:
$params = @{
Id = "<myPolicyId>"
ApplicationId = "<myAppId>"
TenantId = "<myDomain>"
ApplicationSecret = "<MySecret>"
}
$ResourcePath = "<PathToDSCModule>\Modules\Microsoft365DSC\DSCResources"
$ResourceName = 'IntuneSettingCatalogCustomPolicyWindows10'
$ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' `
-InboundParameters $params `
-ProfileName 'beta'
import-module "$ResourcePath\MSFT_$ResourceName" -force
$results=Get-TargetResource @params
$results|convertto-json -depth 100
Could you make sure to hide any confidential information please except for special character that may cause the export to fail such as quotes for example I'm guessing that one of the textbox values in your screenshot is the culprit
@meklulose any chance you could share additional information?
Is this still an issue with the current version of M365DSC?
Closing due to inactivity
I am getting this issue again using version '1.23.1115.1'.
Similar policy settings (Edge Browser), did we ever find out what the issue was?
Thanks in advance.
I am getting the following error:
I am running the following command:
Export-M365DSCConfiguration -Components @("IntuneSettingCatalogCustomPolicyWindows10") -ApplicationId $ApplicationId -ApplicationSecret $ApplicationSecret -TenantId $TenantId
I am able to get rest of the configuration for Intune out. I just have issue with this one. I am running this on windows PowerShell ISE. Microsoft365DSC version 1.23.517.1