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

Add-PnPTeamsChannel producing error of Failed to execute Skype backend request GetThreadS2SRequest but channels are still created[BUG] #3703

Closed
robterrins opened this issue Jan 23, 2024 · 1 comment · Fixed by #3712
Assignees
Labels
bug Something isn't working

Comments

@robterrins
Copy link

robterrins commented Jan 23, 2024

Reporting an Issue or Missing Feature

Please confirm what it is that your reporting
Issue

Expected behavior

Please describe what output you expect to see from the PnP PowerShell Cmdlets
Channels added to a newly created Teams Team without triggering error handling / giving error

Actual behavior

Please describe what you see instead. Please provide samples of output or screenshots.
The cmdlet works for private channels fine but when adding standard channels the code throws an error of "Failed to execute Skype backend request GetThreadS2SRequest".
When checking the team that's been created, the standard channels are present and appear to be provisioned correctly but this issue is triggering error handling and causing the issues with the script.
Adding a retry block doesnt work as the script sees the channel as already existing.
I have tried various start-sleep lengths up to 15 mins and this hasn't had any effect.
I have also tried including the -ChannelType Standard parameter but this also had no effect.

Steps to reproduce behavior

Please include complete script or code samples in-line or linked from gists

image

$Group = New-PnPTeamsTeam -DisplayName $DisplayName -Description $Description -Visibility Private -MailNickName $MailNickName -Owners $OwnersArray

Start-Sleep -Seconds 10

$PrivateChannel1 = Add-PnPTeamsChannel -Team $Group.GroupId -DisplayName 'Private1' -ChannelType Private -OwnerUPN $OwnersArray[0]

$PrivateChannel2 = Add-PnPTeamsChannel -Team $Group.GroupId -DisplayName 'Private2' -ChannelType Private -OwnerUPN $OwnersArray[0]

-------ERRORS START HERE --------

$PrivateChannel3 = Add-PnPTeamsChannel -Team $Group.GroupId -DisplayName "Channel3" -IsFavoriteByDefault $true
$PrivateChannel4 = Add-PnPTeamsChannel -Team $Group.GroupId -DisplayName "Channel4" -IsFavoriteByDefault $true
$PrivateChannel5 = Add-PnPTeamsChannel -Team $Group.GroupId -DisplayName "Channel5" -IsFavoriteByDefault $true

What is the version of the Cmdlet module you are running?

Powershell 7.2.17
PnP.Powershell 2.3.0

Which operating system/environment are you running PnP PowerShell on?

  • [X ] Windows
@robterrins robterrins added the bug Something isn't working label Jan 23, 2024
@gautamdsheth gautamdsheth self-assigned this Jan 28, 2024
gautamdsheth pushed a commit to gautamdsheth/powershell that referenced this issue Jan 28, 2024
gautamdsheth added a commit that referenced this issue Jan 28, 2024
…s channel (#3712)

* Fix #3703 - issue with IsFavoriteByDefault parameter.

* Updated docs with bold text

* Update Add-PnPTeamsChannel.md

---------

Co-authored-by: Gautam Sheth <[email protected]>
@gautamdsheth
Copy link
Collaborator

hi @robterrins , Microsoft has deprecated the IsFavoriteByDefault property from Graph API.
So, that's why you were facing the error.

In the code , have now marked the property as obsolete as well and it will no longer work.
Will remove the property in the next major release. The updated code will be available in tomorrow's nightly builds.

Thanks for raising the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants