Skip to content
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

[IntuneDeviceConfigurationPolicyWindows10] EdgeSearchEngine property is handled incorrectly #2868

Closed
ykuijs opened this issue Feb 3, 2023 · 3 comments
Labels

Comments

@ykuijs
Copy link
Member

ykuijs commented Feb 3, 2023

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

There are two issues with the EdgeSearchEngine property:

  1. The code is returning a sub property called edgeSearchEngineType However, when this property is written back to the Graph, it is not formatted properly, resulting in the below error
  2. When you select the option "Custom Value" in the Admin Portal, the property '' doesn't exist, but 'edgeSearchEngineOpenSearchXmlUrl' is added with the value entered in the Admin Portal: edgeSearchEngineOpenSearchXmlUrl https://test.nl/test.xml

https://github.com/microsoft/Microsoft365DSC/blob/Dev/Modules/Microsoft365DSC/DSCResources/MSFT_IntuneDeviceConfigurationPolicyWindows10/MSFT_IntuneDeviceConfigurationPolicyWindows10.schema.mof#L181

Verbose logs showing the problem

##[error]Property edgeSearchEngine in payload has a value that does not match schema.
    + CategoryInfo          : InvalidOperation: ({ body = Micros...onfiguration1 }:) [], CimException
    + FullyQualifiedErrorId : BadRequest,Microsoft.Graph.PowerShell.Cmdlets.NewMgDeviceManagementDeviceConfiguration_C 
   reateExpanded
    + PSComputerName        : localhost

Suggested solution to the issue

  1. When writing back the config, the correct sub property needs to get selected.
  2. When the provided value is an URL, the other property needs to get populated. The Get method also needs updating in this case to reflect this. As well as the description in the schema.

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

IntuneDeviceConfigurationPolicyWindows10 'ConfigureDeviceConfigurationPolicyWindows10'
{
    displayName      = "CONTOSO | W10 | Device Restriction"
    edgeSearchEngine = "bing"
    Credential       = $credsGlobalAdmin
}

The operating system the target node is running

Windows 11

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

dev

@ykuijs ykuijs added Bug Something isn't working Intune labels Feb 3, 2023
@William-Francillette
Copy link
Contributor

Same as #2867

@NikCharlebois
Copy link
Collaborator

@ykuijs @William-Francillette is this fixed? Can it be closed?

@William-Francillette
Copy link
Contributor

Yes that can be closed

@ykuijs ykuijs closed this as completed Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants