pnp / PnP-PowerShell

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

[BUG] New-PnPTeamsTeam returns error since about 1 week #2884

Open zapftho opened 4 years ago

zapftho commented 4 years ago

Reporting an Issue or Missing Feature

We are using an Azure Function for provisioning of our Teams. Since about 1 week (we started seeing the issue since 24.08.) this Azure Function returns an error at the steps of the call "New-PnPTeamsTeam". Group and SharePoint are created successfully but Team is not. Issue occurs also for the newest available PnP Powershell Online version (3.24.2008.1). Right now we are using 3.23.2007.1 where we started to see this issue. So the issue is not fixed in the latest version.

Expected behavior

New-PnPTeamsTeam returns success and information about the created team (such as GroupID) as it was before

Actual behavior

image

Steps to reproduce behavior

New-PnPTeamsTeam -DisplayName "Test Team 01" -Description "Test Team 01" -MailNickName "00001" -Owner "<user>@<tenant>.onmicrosoft.com"

will result in above error.

Get-PnPException Output:

image

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

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

3.24.2008.1

How did you install the PnP-PowerShell Cmdlets?

xthool commented 4 years ago

+1, same problem with september update

zapftho commented 4 years ago

Maybe interesting for others having the same issue: as a workaround we are now creating the Teams directly using Graph API, however, it would be great if it would work with PnP Powershell again to keep our scripts simple.

xthool commented 4 years ago

Same workaround here but would also prefer the cmdlet :-)

aThuemmel commented 4 years ago

I have the same.

QSjeremyS-zz commented 4 years ago

I have the same problem and hope they Will fix this.

I create a workareound by First creating a new-pnpunifiedgroup Then connect to the spo site and use cmdlet add-pnpteamsteam

get-mrsmit commented 4 years ago

i have the same problem, already from the end of august.

i got in my own post, a feedback to first create a unifiedgroup, connect to the underlying sharepoint site and then add as teams see my function script that i'm creating ( still in progress to learn how to build excelent functions) ` function New-PnPProvTeamsTeam { [CmdletBinding()] param ( [Parameter(Position = 0, Mandatory = $false)][String]$Username, [Parameter(Position = 1, Mandatory = $false)][string]$Pass, [Parameter(Position = 2, Mandatory = $false)][String]$TeamName, [Parameter(Position = 3, Mandatory = $false)][String]$TeamMailNickname, [Parameter(Position = 4, Mandatory = $false)][String]$Description, [Parameter(Position = 5, Mandatory = $false)][String]$Owner )

region > Script variable

$scopes = "group.readwrite.all"
$Username = $Username
$password = $pass | ConvertTo-SecureString -AsPlainText -Force
$credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $Username, $Password

endregion

Connect to MS teams with pnp

Write-output "Connection to the MSGraph for microsoft teams will be esstablished" Connect-PnPOnline -Scopes $scopes -Credentials $credentials

make a unified group

New-PnPUnifiedGroup -DisplayName $TeamName -MailNickname $TeamMailNickname -Description $Description -Owners $Owner

get site url of the group

$Group = Get-PnPUnifiedGroup -Identity $TeamName $URI = $Group.SiteUrl

connect to the tenant

$ConnectTo_UnifiedGroup = Connect-PnPOnline -Url $URI -Credentials $credentials

make a MS Team of the unified group

Add-PnPTeamsTeam -Connection $ConnectTo_UnifiedGroup Disconnect-PnPOnline -Connection $ConnectTo_UnifiedGroup

check if team was created

Connect-PnPOnline -Scopes $scopes -Credentials $credentials $TeamsInfo = Get-PnPTeamsTeam -Identity $TeamName return $TeamsInfo } `

LogicElite commented 3 years ago

For now, I'm creating our Teams using the MicrosoftTeamsPowerShell module then after applying whatever I need using PnP.

For more info : https://docs.microsoft.com/en-us/powershell/module/teams/new-team?view=teams-ps

Consistent and efficient :)

I don't know what's going on with PnP these days.. there are a lot of instabilities.