Skip to content

Get-MgTeamChannelMember for private channel failed (Failed to execute GetThreadRosterAsync) #3321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jolscr opened this issue May 13, 2025 · 0 comments
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience

Comments

@jolscr
Copy link

jolscr commented May 13, 2025

Hi,

The cmdlets below have been throwing errors when targeting private channels with cmdlet "Get-MgTeamChannelMember", while they still work as expected with standard channels and shared channels
The issue appears with Microsoft Graph PowerShell SDK version 2.27.0 and also persists in the latest version 2.28.0. But no issue with version 2.26.1.

Expected behavior

Cmdlets should work for both standard and private channels as long as the required Microsoft Graph permissions are granted, regardless of the SDK version (2.27.0 or 2.28.0).

How to reproduce

Connect-MgGraph -ClientId $clientId -TenantId $tenantId -CertificateThumbprint $certificateThumbprint -ErrorAction:Stop

Get-MgTeamChannelMember -TeamId $TID -ChannelId $CID

SDK Version

2.27.0 and 2.28.0

Latest version known to work for scenario above?

2.26.1

Known Workarounds

Invoke-MgGraphRequest -Method GET -Uri "https://graph.microsoft.com/v1.0/teams/00000000000000/channels/19:0000000000000@thread.tacv2/members"

Debug output

Click to expand log

PS C:\Users\kollyj01> Get-MgTeamChannelMember -TeamId 0000000000000000000 -ChannelId 19:00000000000000000000@thread.tacv2 -debug
DEBUG: [CmdletBeginProcessing]: - Get-MgTeamChannelMember begin processing with parameterSet 'List'.
DEBUG: [Authentication]: - AuthType: 'AppOnly', TokenCredentialType: 'ClientCertificate', ContextScope: 'Process', AppName: 'XXX-PortailM365-ResourcesManagement'.
DEBUG: [Authentication]: - Scopes: [TeamSettings.ReadWrite.All, Channel.Delete.All, BookingsAppointment.ReadWrite.All, AppCatalog.ReadWrite.All, ServiceMessage.Read.All, Group.ReadWrite.All, Bookings.Read.All, Directory.Read.All, ConsentRequest.Read.All, Calendars.ReadBasic.All, TeamMember.ReadWrite.All, ChannelMember.ReadWrite.All, Tasks.ReadWrite.All, ChannelSettings.ReadWrite.All, AuditLog.Read.All, ServiceHealth.Read.All, Sites.FullControl.All].
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://graph.microsoft.com/v1.0/teams/0000000000000000000000/channels/0000000000000000000000000000000%40thread.tacv2/allMembers

Headers:
FeatureFlag : 00000003
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.22631; fr-CH),PowerShell/7.4.7
SdkVersion : graph-powershell/2.28.0
client-request-id : 4badb989-d8a0-4f49-be24-cf305d3ea94f
Accept-Encoding : gzip,deflate,br

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
Forbidden

Headers:
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : f1160899-8244-4c2f-b20e-8ad94815197e
client-request-id : 4badb989-d8a0-4f49-be24-cf305d3ea94f
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Switzerland North","Slice":"E","Ring":"3","ScaleUnit":"002","RoleInstance":"ZR2PEPF000000C7"}}
Date : Tue, 13 May 2025 10:55:13 GMT

Body:
{
"error": {
"code": "Forbidden",
"message": "Failed to execute GetThreadRosterAsync.",
"innerError": {
"code": "Unknown",
"message": "Failed to execute GetThreadRosterAsync.",
"date": "2025-05-13T10:55:13",
"request-id": "f1160899-8244-4c2f-b20e-8ad94815197e",
"client-request-id": "4badb989-d8a0-4f49-be24-cf305d3ea94f"
}
}
}

Get-MgTeamChannelMember_List: Failed to execute GetThreadRosterAsync.

Status: 403 (Forbidden)
ErrorCode: Forbidden
Date: 2025-05-13T10:55:13

Headers:
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : f1160899-8244-4c2f-b20e-8ad94815197e
client-request-id : 4badb989-d8a0-4f49-be24-cf305d3ea94f
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"Switzerland North","Slice":"E","Ring":"3","ScaleUnit":"002","RoleInstance":"ZR2PEPF000000C7"}}
Date : Tue, 13 May 2025 10:55:13 GMT

DEBUG: [CmdletEndProcessing]: - Get-MgTeamChannelMember end processing.

Configuration

PSVersion 7.4.7
PSEdition Core
GitCommitId 7.4.7
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Other information

No response

@jolscr jolscr added status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience labels May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned type:bug A broken experience
Projects
None yet
Development

No branches or pull requests

1 participant