Which role/permission needed?

H Risbud 251 Reputation points
2023-01-30T16:23:03.33+00:00

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.
9,627 questions
SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,300 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,328 questions
0 comments No comments
{count} votes