msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

New-MgDirectoryAdministrativeUnitMemberByRef - missing AdditionalProperties and BodyParameter parameters

Open prehor opened this issue 3 years ago • 1 comments

New-MgDirectoryAdministrativeUnitMemberByRef and New-MgAdministrativeUnitMemberByRef (beta only) lost the AdditionalProperties and BodyParameter parameters after upgrading the module Microsoft.Graph.Identity.DirectoryManagement to version 1.11.

Similar to #1440, but unfortunately there is no New-MgDirectoryAdministrativeUnitMember or New-MgAdministrativeUnitMember.

> New-MgAdministrativeUnitMemberByRef -AdministrativeUnitId $AdministrativeUnit.Id -BodyParameter @{ '@odata.id'="https://graph.microsoft.com/$($MgProfile)/$($Member.Class)s/$($Member.Id)" }

New-MgAdministrativeUnitMemberByRef: A parameter cannot be found that matches parameter name 'BodyParameter'.

> Get-Help New-MgAdministrativeUnitMemberByRef                                                                                                                                                         
NAME
    New-MgAdministrativeUnitMemberByRef
    
SYNOPSIS
    Create new navigation property ref to members for administrativeUnits
    
    
SYNTAX
    New-MgAdministrativeUnitMemberByRef -AdministrativeUnitId <String> [-Break] [-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] [-PassThru] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [<CommonParameters>]
    
    New-MgAdministrativeUnitMemberByRef -InputObject <IIdentityDirectoryManagementIdentity> [-Break] [-HttpPipelineAppend <SendAsyncStep[]>] [-HttpPipelinePrepend <SendAsyncStep[]>] [-PassThru] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [<CommonParameters>]
    
    
DESCRIPTION
    Create new navigation property ref to members for administrativeUnits

prehor avatar Aug 10 '22 08:08 prehor

Same issue found with: New-MgApplicationOwnerByRef, works on 1.10 with a BodyParameter but not on 1.11.

erwinkramer avatar Aug 10 '22 09:08 erwinkramer

i can confirm the issue in 1.11.0 - version 1.10 works

sfr23 avatar Aug 17 '22 19:08 sfr23

Sorry about this, and thanks for surfacing the error with us. We've released a patch that fixes the issues at https://github.com/microsoftgraph/msgraph-sdk-powershell/releases/tag/1.11.1.

Please upgrade to the latest version of the module (1.11.1) using Update-Module Microsoft.Graph. Let me know if the patch addresses the issue on your end.

Related to #1440.

peombwa avatar Aug 23 '22 16:08 peombwa

Was fixed by https://github.com/microsoftgraph/msgraph-sdk-powershell/releases/tag/1.11.1.

peombwa avatar Aug 25 '22 18:08 peombwa