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

Intune Workload fails to create localhost.mof IntuneDeviceConfigurationEndpointProtectionPolicyWindows10 (MSFT_MicrosoftGraphwindowsFirewallRule) #3851

Closed
ChrisJay77 opened this issue Oct 30, 2023 · 5 comments · Fixed by #3886 or #3895
Labels
Bug Something isn't working Intune

Comments

@ChrisJay77
Copy link

Description of the issue

When i do a intune worklaod export:
export-m365dscconfiguration -applicationid XXXXXX-tenant XXX.onmicrosoft.com -applicationsecret XXXX -Workloads INTUNE -Path C:\Sit\Nov_Full
It cannot create and generates the following error:

Write-Error: C:\SIT\Nov_Full\M365TenantConfig.ps1:14984
Line |
14984 | MSFT_MicrosoftGraphwindowsFirewallRule{
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| At least one of the values 'System.Object[]' is not supported or valid for property
| 'Action' on class 'MSFT_MicrosoftGraphWindowsFirewallRule'. Please specify only
| supported values: notConfigured, blocked, allowed.
the powershell line 14984 is as follows:
MSFT_MicrosoftGraphwindowsFirewallRule{
InterfaceTypes = 'System.Object[]'
TrafficDirection = 'System.Object[]'
ProfileTypes = 'System.Object[]'
Protocol = @(
6
6
)
Action = 'System.Object[]'
Description = @(
'Allow Remote Desktop Connection'
'Allow Remote PowerShell'

This can be replicated in any test environment when creating a standard firewall policy please can you check as the other 65 sections of the intune workload work fine. Thanks

Microsoft 365 DSC Version

Documents\PowerShell\Modules\Microsoft365DSC\1.23.1025.1 1.23.1025.1

Which workloads are affected

other

The DSC configuration

No response

Verbose logs showing the problem

Write-Error: C:\SIT\test_update\M365TenantConfig.ps1:14984
 Line |
14984 |                  MSFT_MicrosoftGraphwindowsFirewallRule{
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | At least one of the values 'System.Object[]' is not supported or valid for property
      | 'EdgeTraversal' on class 'MSFT_MicrosoftGraphWindowsFirewallRule'. Please specify
      | only supported values: notConfigured, blocked, allowed.
Write-Error: C:\SIT\test_update\M365TenantConfig.ps1:14984
 Line |
14984 |                  MSFT_MicrosoftGraphwindowsFirewallRule{
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | At least one of the values 'System.Object[]' is not supported or valid for property
      | 'InterfaceTypes' on class 'MSFT_MicrosoftGraphWindowsFirewallRule'. Please specify
      | only supported values: notConfigured, remoteAccess, wireless, lan.
Write-Error: C:\SIT\test_update\M365TenantConfig.ps1:14984
 Line |
14984 |                  MSFT_MicrosoftGraphwindowsFirewallRule{
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | At least one of the values 'System.Object[]' is not supported or valid for property
      | 'ProfileTypes' on class 'MSFT_MicrosoftGraphWindowsFirewallRule'. Please specify
      | only supported values: notConfigured, domain, private, public.
Write-Error: C:\SIT\test_update\M365TenantConfig.ps1:14984
 Line |
14984 |                  MSFT_MicrosoftGraphwindowsFirewallRule{
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | At least one of the values 'System.Object[]' is not supported or valid for property
      | 'TrafficDirection' on class 'MSFT_MicrosoftGraphWindowsFirewallRule'. Please specify
      | only supported values: notConfigured, out, in.
Write-Error: C:\SIT\test_update\M365TenantConfig.ps1:15008
 Line |
15008 |                  MSFT_MicrosoftGraphwindowsFirewallRule{
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | At least one of the values 'System.Object[]' is not supported or valid for property
      | 'Action' on class 'MSFT_MicrosoftGraphWindowsFirewallRule'. Please specify only
      | supported values: notConfigured, blocked, allowed.
Write-Error: C:\SIT\test_update\M365TenantConfig.ps1:15008
 Line |
15008 |                  MSFT_MicrosoftGraphwindowsFirewallRule{
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | At least one of the values 'System.Object[]' is not supported or valid for property
      | 'EdgeTraversal' on class 'MSFT_MicrosoftGraphWindowsFirewallRule'. Please specify
      | only supported values: notConfigured, blocked, allowed.
Write-Error: C:\SIT\test_update\M365TenantConfig.ps1:15008
 Line |
15008 |                  MSFT_MicrosoftGraphwindowsFirewallRule{
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | At least one of the values 'System.Object[]' is not supported or valid for property
      | 'InterfaceTypes' on class 'MSFT_MicrosoftGraphWindowsFirewallRule'. Please specify
      | only supported values: notConfigured, remoteAccess, wireless, lan.
Write-Error: C:\SIT\test_update\M365TenantConfig.ps1:15008
 Line |
15008 |                  MSFT_MicrosoftGraphwindowsFirewallRule{
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | At least one of the values 'System.Object[]' is not supported or valid for property
      | 'ProfileTypes' on class 'MSFT_MicrosoftGraphWindowsFirewallRule'. Please specify
      | only supported values: notConfigured, domain, private, public.
Write-Error: C:\SIT\test_update\M365TenantConfig.ps1:15008
 Line |
15008 |                  MSFT_MicrosoftGraphwindowsFirewallRule{
      |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      | At least one of the values 'System.Object[]' is not supported or valid for property
      | 'TrafficDirection' on class 'MSFT_MicrosoftGraphWindowsFirewallRule'. Please specify
      | only supported values: notConfigured, out, in.

Environment Information + PowerShell Version

OsName               : Microsoft Windows 10 Enterprise
OsOperatingSystemSKU : EnterpriseEdition
OsArchitecture       : 64-bit
WindowsVersion       : 2009
WindowsBuildLabEx    : 19041.1.amd64fre.vb_release.191206-1406
OsLanguage           : en-GB
OsMuiLanguages       : {en-GB}
@andikrueger andikrueger added Bug Something isn't working Intune labels Nov 3, 2023
@ChrisJay77
Copy link
Author

I've updated to 1.23.1108.1 and still get the same error, any update on the issue @andikrueger ? Thanks

@andikrueger
Copy link
Collaborator

@William-Francillette Could you have a look at this issue? This looks like the validate set and the cmdLet's parameters do not match. Thanks!

@William-Francillette
Copy link
Contributor

Sure leave it with me

@ricmestre
Copy link
Contributor

@William-Francillette Hi, I reported another issue #3444 for this resource, it now works for deploying to another tenants but when re-deploying the tests fail and always tries to update the policies even though they are all correct as in the blueprint configuration.

Could you please ensure this is also fixed?

@William-Francillette
Copy link
Contributor

William-Francillette commented Nov 13, 2023

Thanks @ChrisJay77 for reporting the issue, there was a problem with parsing FirewallRules
image

I was able to export, create and update the policy successfully

@ricmestre I've also resolved your issue - Test-TargetResource was evaluating the Id parameter and thus returning false when duplicating the policy to a new tenant (the Id would have been different)

All part of #3886

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
4 participants