Skip to content

Fix Get-PnPTeamsChannel MembershipType return value#4054

Merged
KoenZomers merged 5 commits intopnp:devfrom
jackpoz:fixes/GetTeamsChannelsShared
Jun 30, 2024
Merged

Fix Get-PnPTeamsChannel MembershipType return value#4054
KoenZomers merged 5 commits intopnp:devfrom
jackpoz:fixes/GetTeamsChannelsShared

Conversation

@jackpoz
Copy link
Contributor

@jackpoz jackpoz commented Jun 29, 2024

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Fixes #4043

What is in this Pull Request ?

Fix Get-PnPTeamsChannel returning MembershipType with "unknownFutureValue" for shared channels instead of "shared".

As described in the Graph documentation at https://learn.microsoft.com/en-us/graph/api/resources/channel?view=graph-rest-1.0#properties , membershipType enum requires an additional header Prefer: include-unknown-enum-members to get the value of shared for shared channels, otherwise it will return unknownFutureValue .

Before this PR:
before

After this PR:
after

Fix Get-PnPTeamsChannel returning MembershipType with "unknownFutureValue" for shared channels instead of "shared"
@KoenZomers
Copy link
Collaborator

Thanks @jackpoz !

@KoenZomers KoenZomers merged commit 127ea43 into pnp:dev Jun 30, 2024
@jackpoz
Copy link
Contributor Author

jackpoz commented Jun 30, 2024

Oh, thanks for fixing GetPrimaryChannel() too, I didn't notice there was /teams/{groupId}/primaryChannel endpoint too 👍

@jackpoz jackpoz deleted the fixes/GetTeamsChannelsShared branch August 10, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Get-PnPTeamsChannel 'MembershipType' property returns 'unknownFutureValue' if Teams Channel is a Shared Channel

2 participants