You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IntuneAccountProtectionLocalUserGroupMembershipPolicy: Configurations with MSFT_IntuneAccountProtectionLocalUserGroupCollection action 'add_replace' compile but fail to be applied
#5318
Trying to create / update an account protection policy to add users/groups to local admins fails if the action is set to add_replace. The configuration compiles successfully but throws an error when getting applied.
According to the error message the value should actually be add_restrict.
I can confirm that manually changing the compiled .mof to use the Action add_restrict results in the configuration being applied successfuly:
instance of MSFT_IntuneAccountProtectionLocalUserGroupCollection as $MSFT_IntuneAccountProtectionLocalUserGroupCollection1ref
{
LocalGroups = {
"administrators"
};
Members = {
"S-1-12-1-1719499666-1200013040-2812009110-2951708484"
};
Action ="add_restrict";
UserSelectionType ="users";
};
Updating the configuration itself to use add_restrict gives a compilation error (the expected values match what is mentioned in the documentation):
Microsoft365DSC\MSFT_IntuneAccountProtectionLocalUserGroupCollection : At least one of the values 'add_restrict' is not supported or valid for property 'Action' on class 'MSFT_IntuneAccountProtectionLocalUserGroupCollection'. Please specify only supported values: add_update, remove_update, add_replace.
Note: Exporting the policy via Export-M365DSCConfiguration produces a configuration with the the expected add_restrict value for action.
Description of the issue
Trying to create / update an account protection policy to add users/groups to local admins fails if the action is set to
add_replace
. The configuration compiles successfully but throws an error when getting applied.According to the error message the value should actually be
add_restrict
.I can confirm that manually changing the compiled .mof to use the Action
add_restrict
results in the configuration being applied successfuly:Updating the configuration itself to use
add_restrict
gives a compilation error (the expected values match what is mentioned in the documentation):Microsoft365DSC\MSFT_IntuneAccountProtectionLocalUserGroupCollection : At least one of the values 'add_restrict' is not supported or valid for property 'Action' on class 'MSFT_IntuneAccountProtectionLocalUserGroupCollection'. Please specify only supported values: add_update, remove_update, add_replace.
Note: Exporting the policy via
Export-M365DSCConfiguration
produces a configuration with the the expectedadd_restrict
value foraction
.Microsoft 365 DSC Version
1.24.1016.1
Which workloads are affected
Intune
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
Get-ComputerInfo -Property @('OsName','OsOperatingSystemSKU','OSArchitecture','WindowsVersion','WindowsBuildLabEx','OsLanguage','OsMuiLanguages')
OsName : Microsoft Windows 11 Pro
OsOperatingSystemSKU : 48
OsArchitecture : 64-bit
WindowsVersion : 2009
WindowsBuildLabEx : 22621.1.amd64fre.ni_release.220506-1250
OsLanguage : en-US
OsMuiLanguages : {en-US, en-GB}
$PSVersionTable
Name Value
PSVersion 5.1.22621.4391
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.4391
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
The text was updated successfully, but these errors were encountered: