entra-powershell
entra-powershell copied to clipboard
[Bug] Set-AzureADMSAdministrativeUnit
Command Used:
Set-AzureADMSAdministrativeUnit -Id $adminUnit.Id -MembershipRule '(user.country -eq "Germany")'
Error:
Set-EntraMSAdministrativeUnit : Cannot bind argument to parameter 'Id' because it is an empty string. At line:1 char:37
- Set-AzureADMSAdministrativeUnit -Id $adminUnit.Id -MembershipRule '(u ...
-
~~~~~~~~~~~~~- CategoryInfo : InvalidData: (:) [Set-EntraMSAdministrativeUnit], ParameterBindingValidationException
- FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyStringNotAllowed,Set-EntraMSAdministrativeUnit
The cmdlet is throwing an error due to an empty ID being passed to it. The transformed Entra cmdlet is functioning correctly, but some parameters are missing in MgGrapg cmdlet, including [-MembershipRule <String>] [-MembershipRuleProcessingState <String>] [-MembershipType <String>]. So the Entra cmdlets won't work with these missing parameters.