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

`Get-MgTeamChannel` fails with `Parameter set cannot be resolved using the specified named parameters`.

Open peombwa opened this issue 4 years ago • 2 comments

Get-MgTeamChannel -TeamId -ChannelId fails with Parameter set cannot be resolved using the specified named parameters.

The is caused by the recent of addition of /teams/{team-id}/allChannels API which cause AutoREST to drop the All hence a conflict with /teams/{team-id}/Channels.

As a patch, we should add a directive to rename the wrongly named Get-MgTeamChannel to Get-MgAllTeamChannel.

A long-term fix will be provided by AutoREST.PowerShell in https://github.com/Azure/autorest.powershell/issues/1002.

peombwa avatar Oct 07 '22 18:10 peombwa

This Issue still exists. There are two parameter sets with the same parameters causing it to become ambiguous and fail. it occurs when you specify ChannelId. this is evidenced by the documentation as well https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.teams/get-mgteamchannel?view=graph-powershell-1.0 You can see that parameter sets 2 and 3 are ambiguous or duplicated.

alphaz18 avatar Aug 11 '23 15:08 alphaz18

Thanks for bringing this to our attention.

Unfortunately, this is due to how the code generator interprets the presence of All in API paths. We will manually rename the commands to disambiguate the conflicting parameter sets in the next release.

peombwa avatar Aug 15 '23 18:08 peombwa