Skip to content
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

Invoke-MgHaveTeamChannel does not work #2639

Closed
buckbanzai opened this issue Mar 20, 2024 · 3 comments
Closed

Invoke-MgHaveTeamChannel does not work #2639

buckbanzai opened this issue Mar 20, 2024 · 3 comments
Assignees

Comments

@buckbanzai
Copy link

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
@timayabi2020 timayabi2020 added the goodfirstissue Standard GitHub label used for easy to resolve issues targeting beginner contributors label Jan 23, 2025
@timayabi2020
Copy link
Contributor

@buckbanzai apologies for the delayed response. I tried both with graph explorer and the SDK and the requests failed with the same error you are getting.

Image

The alternative will be to manually check who has access by using Get-MgTeamChannelMember -TeamId $teamId -ChannelId $channelId. I also advise that you open graph support ticket here so that the service owner can also have a look.

@timayabi2020 timayabi2020 added status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close Service issue and removed Status: Needs Investigation goodfirstissue Standard GitHub label used for easy to resolve issues targeting beginner contributors labels Jan 29, 2025
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@timayabi2020
Copy link
Contributor

Closing this issue due to inactivity

@microsoft-github-policy-service microsoft-github-policy-service bot removed the status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close label Feb 4, 2025
@Ndiritu Ndiritu assigned timayabi2020 and unassigned Ndiritu Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants