Which role/permission needed?

H Risbud 251 Reputation points

I've SharePoint Admin role enabled. While executing 'New-PnPTeamsTeam' command I'm getting error. Please advise which role/permission needed to overcome error and how to activate?

Write-Host "Connect to Admin centre"
Connect-PnPOnline -ClientId $appId -CertificatePath $Path -CertificatePassword $password -Url $AdminCenterURL -Tenant $Tenant
Write-Host "Creating New Teams Site"
New-PnPTeamsTeam -DisplayName $SiteTitle -Description $SiteDescription -MailNickName $SiteName -Owners $TeamSiteOwner -Visibility Private

New-PnPTeamsTeam : Caller does not have the required permissions for accessing this API. AllowedPermissions:'TeamMember.ReadWriteNonOwnerRole.All,TeamMember.ReadWrite.All'

At line:3 char:17

  • ... New-PnPTeamsTeam -DisplayName $SiteTitle -Description $Si ...
    • CategoryInfo : InvalidOperation: (:) [New-PnPTeamsTeam], PSInvalidOperationException
    • FullyQualifiedErrorId : InvalidOperation,PnP.PowerShell.Commands.Graph.NewTeamsTeam
Microsoft Teams
Microsoft Teams
A Microsoft customizable chat-based workspace.
8,726 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,233 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
1,873 questions
0 comments No comments
{count} votes