msgraph-sdk-powershell
msgraph-sdk-powershell copied to clipboard
Add-MgTeamChannelMember Returns: 404 page not found
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.
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.
I've transferred the issue to the metadata repository at https://github.com/microsoftgraph/msgraph-metadata/issues/169#issuecomment-1360608233.