pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
985 stars 665 forks source link

[BUG] #2863

Open QSjeremyS-zz opened 3 years ago

QSjeremyS-zz commented 3 years ago

Reporting an Issue or Missing Feature

When i connect to pnponline for the MSTeams cmdlets (connect-pnponline -scopes "Group.ReadWrite.All") and then i try to create a new team with following code New-PnPTeamsTeam -DisplayName "PnPROcks" I trows an error

Expected behavior

a new create Microsoft Teams

Actual behavior

image

Steps to reproduce behavior

Connect-PnPOnline -Scopes "Group.ReadWrite.All" New-PnPTeamsTeam -Displayname "giveitaname"

Which version of the PnP-PowerShell Cmdlets are you using?

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

3.24.20... SharePointPnPPowerShellOnline

How did you install the PnP-PowerShell Cmdlets?

QSjeremyS-zz commented 3 years ago

The weird part is. connecting is working fine. get-pnpTeamsteam works fine editing exisiting teams works fine.

only new-pnpteamsteam doenst work

jackpoz commented 3 years ago

This is caused by the way TeamsUtility.NewTeamAsync() works, creating a M365 Group first and then creating a MS Teams from it. The call to create a MS Team from a M365 Group often throws a 404 Not Found error and should be retried after some minutes, but the current code doesn't do that.

You can verify this by calling Get-PnPUnifiedGroup -Identity "giveitaname" after 1 minute. Calling again New-PnPTeamsTeam -Displayname "giveitaname" after a few minutes will create a MS Team successfully.

QSjeremyS-zz commented 3 years ago

weird, in a youtube video they show that new-pnpteamsteam works fine. i created a workarround first create a pnpunified group. get the group its site Url connect to the site convert it to a team

QSjeremyS-zz commented 3 years ago

is there a solution so that we can normaly use new-pnpteamsteam?