microsoft / Microsoft365DSC

Manages, configures, extracts and monitors Microsoft 365 tenant configurations
https://aka.ms/M365DSC
MIT License
1.53k stars 469 forks source link

DEVOPS - The property 'stringValue' does not exist on type 'microsoft.management.services.api.deviceManagementConfigurationStringSettingValue' #3578

Open stvnmbr1 opened 1 year ago

stvnmbr1 commented 1 year ago

Description of the issue

Exported Intune configuration from tenant translate/copy exported config to relevant schema files

Deploy through DevOps -> The property 'stringValue' does not exist .

This is for multiple configs where stringValue is defined, looks like setting catalog.

I have the same issue with intValue but will open another issue.

Microsoft 365 DSC Version

1.23.809.1

Which workloads are affected

other

The DSC configuration

IntuneSettingCatalogCustomPolicyWindows10 "IntuneSettingCatalogCustomPolicyWindows10-55d12a3e-9cff-4077-afb9-0b57e42eec65"
{
    Assignments          = @();
    Credential           = $Credential;
    Description          = "";
    Ensure               = "Present";
    Id                   = "55d12a3e-9cff-4077-afb9-0b57e42eec65";
    Name                 = "Windows | Chrome | Managed Bookmarks";
    Platforms            = "windows10";
    Settings             = @(
        MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{

            SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
                SettingDefinitionId = 'device_vendor_msft_policy_config_chromeintunev1~policy~googlechrome_managedbookmarks'

                choiceSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationChoiceSettingValue{
                    Value = 'device_vendor_msft_policy_config_chromeintunev1~policy~googlechrome_managedbookmarks_1'

                    Children = @(
                        MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
                            SettingDefinitionId = 'device_vendor_msft_policy_config_chromeintunev1~policy~googlechrome_managedbookmarks_managedbookmarks'
                            odataType = '#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance'

                            simpleSettingValue = MSFT_MicrosoftGraphDeviceManagementConfigurationSimpleSettingValue{
                                StringValue = '{ toplevel_name: My managed favorites folder }, { name: Microsoft, url: microsoft.com }, { name: Bing, url: bing.com }'
                                odataType = '#microsoft.graph.deviceManagementConfigurationStringSettingValue'
                            }

                        }
                    )
                }
                odataType = '#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance'
            }

        }
    );
    Technologies         = "mdm";
}

Verbose logs showing the problem

2023-08-14T15:08:38.5893601Z VERBOSE: [test]:
2023-08-14T15:08:38.5897861Z [[IntuneSettingCatalogCustomPolicyWindows10]IntuneSettingCatalogCustomPolicyWindows10-55d12a3e-9cff-4077-afb9-0b57e42ee 2023-08-14T15:08:38.5903073Z c65::[Intune]Intune_Configuration] Creating an Intune Setting Catalog Custom Policy for Windows10 with Name {} 2023-08-14T15:08:39.2139040Z ##[error][ModelValidationFailure] : The property 'stringValue' does not exist on type 'microsoft.management.services.api.deviceManagementConfigurationStringSettingValue'. Make sure to only use property names that are defined by the type.

Environment Information + PowerShell Version

Devops ENV following whitepaper
stvnmbr1 commented 1 year ago

only things i found related :

https://learn.microsoft.com/en-us/graph/api/resources/intune-deviceconfigv2-devicemanagementconfigurationstringsettingvalue?view=graph-rest-beta

{ "@odata.type": "#microsoft.graph.deviceManagementConfigurationStringSettingValue", "settingValueTemplateReference": { "@odata.type": "microsoft.graph.deviceManagementConfigurationSettingValueTemplateReference", "settingValueTemplateId": "String", "useTemplateDefault": true }, "value": "String" }

richardjgreen commented 10 months ago

Same issue here running 1.23.906.1 via Azure DevOps. Is affecting anything which references MSFT_MicrosoftGraphDeviceManagementConfigurationSimpleSettingValue because stringValue and intValue are reported as not existing on type.

The property 'stringValue' does not exist on type

I have multiple examples of this not working, however, one example is as follows.

``IntuneSettingCatalogCustomPolicyWindows10 "IntuneSettingCatalogCustomPolicyWindows10-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" { ApplicationId = $ConfigurationData.NonNodeData.ApplicationId; Assignments = @(); CertificateThumbprint = $ConfigurationData.NonNodeData.CertificateThumbprint; Description = ""; Ensure = "Present"; Id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"; Name = "MDEEXCLUSIONS"; Platforms = "windows10"; Settings = @( MSFT_MicrosoftGraphdeviceManagementConfigurationSetting{

                SettingInstance = MSFT_MicrosoftGraphDeviceManagementConfigurationSettingInstance{
                    SettingDefinitionId = 'device_vendor_msft_policy_config_defender_excludedextensions'

                    simpleSettingCollectionValue = @(
                        MSFT_MicrosoftGraphDeviceManagementConfigurationSimpleSettingValue{
                            odataType = '#microsoft.graph.deviceManagementConfigurationStringSettingValue'
                            StringValue = '%windir%\\Security\\Database\\*.chk'
                        }
                        MSFT_MicrosoftGraphDeviceManagementConfigurationSimpleSettingValue{
                            odataType = '#microsoft.graph.deviceManagementConfigurationStringSettingValue'
                            StringValue = '%windir%\\Security\\Database\\*.edb'
                        }
                    odataType = '#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstance'
                }
            }
            });
        Technologies          = "mdm";
        TenantId              = $OrganizationName;
    }``