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] NetworkProxyServer property incorrectly handled #2867

Closed
ykuijs opened this issue Feb 3, 2023 · 3 comments
Labels
Bug Something isn't working Intune

Comments

@ykuijs
Copy link
Member

ykuijs commented Feb 3, 2023

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

The NetworkProxyServer property is defined as a string array in the schema of the resource:

[Write, Description("Specifies manual proxy server settings.")] String NetworkProxyServer[];

However, the Get method returns the property directly and is outputting a Dictionary object. In the Export, this is resulting in the following output:

NetworkProxyServer = System.Collections.Generic.Dictionary`2[System.String,System.Object];

When reviewing the NetworkProxyServer property, the output is this:

Key                  Value                           
---                  -----                           
address              proxy.contoso.com:8080          
exceptions           {*.contoso.com...               
useForLocalAddresses False 

Verbose logs showing the problem

##[error]Property networkProxyServer 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

I think the fix is to update the NetworkProxyServer property to the a CIMInstance:
Address: String
Exceptions: String[]
UseForLocalAddresses: Boolean

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
@ykuijs
Copy link
Member Author

ykuijs commented Feb 3, 2023

The example also needs to get updated to reflect the change.

@William-Francillette
Copy link
Contributor

We probably should generate this resource with the DRG to make sure all embedded CIM are used for complex parameters
It will be a breaking change

@ykuijs
Copy link
Member Author

ykuijs commented Apr 17, 2023

Closed via #3118

@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
Bug Something isn't working Intune
Projects
None yet
Development

No branches or pull requests

2 participants