-
Notifications
You must be signed in to change notification settings - Fork 215
Description
I need to generate an array of all messages in a channel but this command is apparently limited to 50 messages.
Get-MgTeamChannelMessage -TeamId $team.id -ChannelId $channel.id -PageSize 50
returns 50 message but
Get-MgTeamChannelMessage -TeamId $team.id -ChannelId $channel.id -PageSize 51
throws the error "Limit of '50' for Top Query has been exceeded." I didn't specify a Top query
if you use the -Top parameter with anything over 50 you get the same error, the -All parameter does the same thing.
I understand API limits but having to get 50 messages, then do another query with a -Skip 50 and add to the array, then do a -Skip 100 (rinse repeat) seems ridiculous!
I can't find any workaround for this in the relatively sparse documentation for these modules.