msgraph-sdk-powershell
msgraph-sdk-powershell copied to clipboard
New-MgDirectoryAdministrativeUnitMemberByRef - missing AdditionalProperties and BodyParameter parameters
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
Same issue found with: New-MgApplicationOwnerByRef, works on 1.10 with a BodyParameter but not on 1.11.
i can confirm the issue in 1.11.0 - version 1.10 works
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.
Was fixed by https://github.com/microsoftgraph/msgraph-sdk-powershell/releases/tag/1.11.1.