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

Add-MgTeamChannelMember Returns: 404 page not found

Open Sekers opened this issue 3 years ago • 1 comments

Add-MgTeamChannelMember Returns '404 page not found' This occurs with both v1.0 and beta.

Add-MgTeamChannelMember_Add1: C:\Users\XXXXXX\Documents\PowerShell\Modules\Microsoft.Graph.Teams\1.11.1\exports\v1.0\ProxyCmdletDefinitions.ps1:276:23
Line |
 276 |          $scriptCmd = {& $wrappedCmd @PSBoundParameters}
     |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | 404 page not found

I have gotten New-MgTeamChannelMember to work but I would prefer to use Add-MgTeamChannelMember so I can batch add users instead of making a call to the API for each member to add.

I am also confident that the TeamID, ChannelId, and BodyParameter formats are correct since I have no problems using the similar Add-MgTeamMember.

Sekers avatar Sep 07 '22 19:09 Sekers

Thanks for following up on this.

From the docs, it looks like you can only add members in bulk to a team. The right command to use is Add-MgTeamMember.

/teams/{team-id}/channels/{channel-id}/members/add (Add-MgTeamChannelMember) should not exist as path/command. I'll transfer the issue to right repo for the metadata to be cleaned.

peombwa avatar Sep 14 '22 22:09 peombwa

I've transferred the issue to the metadata repository at https://github.com/microsoftgraph/msgraph-metadata/issues/169#issuecomment-1360608233.

peombwa avatar Dec 21 '22 00:12 peombwa