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

Invoke-MgHaveTeamChannel does not work

Open buckbanzai opened this issue 1 year ago • 0 comments

Describe the bug Invoke-MgHaveTeamChannel doesn't complete successfully, but instead throws an error that the "Requested API is not supported. Please check the path."

I've tested on the Graph Explorer with the URL parameters formatted per the documentation with the same test values, and that worked as expected.

To Reproduce Steps to reproduce the behavior:

  1. Execute Invoke-MgHaveTeamChannel with -TeamId, -ChannelId, and -UserId set to their respective values
  2. Receive an error

Expected behavior Receive a boolean result, indicating if the user is a member

Debug Output

DEBUG: [CmdletBeginProcessing]: - Invoke-MgHaveTeamChannel begin processing with parameterSet 'Have'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'.
DEBUG: [Authentication]: - Scopes: [Application.ReadWrite.All, AuditLog.Read.All, DeviceManagementManagedDevices.Read.All, Group.ReadWrite.All, openid, Organization.Read.All, profile, ServiceHealth.Read.All, Team.ReadBasic.All, TeamSettings.ReadWrite.All, User.Read, User.Read.All, User.ReadWrite.All, email, ChannelMember.ReadWrite.All].
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://graph.microsoft.com/v1.0/teams/7438551b-[REMOVED REST OF TEAM ID]/channels/[REMOVED REST OF CHANNEL ID]thread.skype/microsoft.graph.doesUserHaveAccess(userId='@userId',tenantId='@tenantId',userPrincipalName='@userPrincipalName')?userId=c524fd68-[REMOVED REST OF USER ID]

Headers:
FeatureFlag                   : 00000043
Cache-Control                 : no-store, no-cache
User-Agent                    : Mozilla/5.0,(Macintosh; Darwin 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:06 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T8103; en-US),PowerShell/7.4.1
Accept-Encoding               : gzip
SdkVersion                    : graph-powershell/2.15.0
client-request-id             : 6aed10b6-6863-4990-8c9f-480b1dd1fe0

Body:



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

Status Code:
NotFound

Headers:
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : 1b0bb194-42e3-408f-a944-28bd1266f763
client-request-id             : 6aed10b6-6863-4990-8c9f-480b1dd1fe0d
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"1","ScaleUnit":"002","RoleInstance":"MWH0EPF000A6F63"}}
Date                          : Wed, 20 Mar 2024 16:32:04 GM

Body:
{
  "error": {
    "code": "NotFound",
    "message": "Requested API is not supported. Please check the path.",
    "innerError": {
      "date": "2024-03-20T16:32:04",
      "request-id": "1b0bb194-42e3-408f-a944-28bd1266f763",
      "client-request-id": "6aed10b6-6863-4990-8c9f-480b1dd1fe0d"
    }
  }
}


Invoke-MgHaveTeamChannel_Have:
Line |
   2 |              $HasAccessToSharedChannel = Invoke-MgHaveTeamChannel -Tea …
     |              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Requested API is not supported. Please check the path.

Status: 404 (NotFound)
ErrorCode: NotFound
Date: 2024-03-20T16:32:04

Headers:
Vary                          : Accept-Encoding
Strict-Transport-Security     : max-age=31536000
request-id                    : 1b0bb194-42e3-408f-a944-28bd1266f763
client-request-id             : 6aed10b6-6863-4990-8c9f-480b1dd1fe0d
x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"West US 2","Slice":"E","Ring":"1","ScaleUnit":"002","RoleInstance":"MWH0EPF000A6F63"}}
Date                          : Wed, 20 Mar 2024 16:32:04 GM

DEBUG: [CmdletEndProcessing]: - Invoke-MgHaveTeamChannel end processing.

Environment Data

Name                           Value
----                           -----
PSVersion                      7.4.1
PSEdition                      Core
GitCommitId                    7.4.1
OS                             Darwin 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:06 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T8103
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

buckbanzai avatar Mar 20 '24 16:03 buckbanzai