Skip to content

BUG: Get-MgChat and Get-MgUserChat, -All or -pagesize gives "the limit of 50 for Top query has been exceeded." #1248

@mbourgon

Description

@mbourgon

Howdy! I just started trying to use MG cmdlets. I'm trying to get all my messages in the last week, from any chat I'm in.
However, I immediately ran into what appears to be a bug - only a max of 50 are supported. Unfortunately, I need all - I can't filter on LastUpdatedDateTime since that's when something about the channel was changed, not the last message. Which means I need to look at all chats. (if there's a way to just look at all messages, maybe that would work?)

PS> get-mgchat -all
Get-MgChat_List1: The query specified in the URI is not valid. The limit of '50' for Top query has been exceeded. The value from the incoming request is '100'.

PS> get-mguserchat  -UserId "my-user-id-guid-here" -pagesize 300
Get-MgUserChat_List1: The query specified in the URI is not valid. The limit of '50' for Top query has been exceeded. The value from the incoming request is '300'.
PS> get-mguserchat  -UserId "my-user-id-guid-here" -All
Get-MgUserChat_List1: The query specified in the URI is not valid. The limit of '50' for Top query has been exceeded. The value from the incoming request is '100'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions