entra-powershell icon indicating copy to clipboard operation
entra-powershell copied to clipboard

[Bug] Set-AzureADMSAdministrativeUnit

Open SteveMutungi254 opened this issue 1 year ago • 1 comments

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

SteveMutungi254 avatar Jan 06 '24 16:01 SteveMutungi254

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.

v-akarke avatar Jan 12 '24 13:01 v-akarke