Skip to content

[BUG] New-PnPTeamsTeam does not work in app-only context #4646

@peterwiens

Description

@peterwiens

Reporting an Issue or Missing Feature

When connection with certificate it is not possible to create a new Teams team.

Expected behavior

The Team should be created as if I used -Interactive

Actual behavior

Error message: Insufficient privileges to complete the operation

Steps to reproduce behavior

Connect-PnPOnline -Url $siteUrl -ClientId $clientId -CertificatePath $cert -CertificatePassword $secureCertificatePassword -Tenant $tenant 
New-PnPTeamsTeam -DisplayName $teamTitle -MailNickName $teamAlias -Owners $teamOwners -Members $teamMembers -ResourceBehaviorOptions WelcomeEmailDisabled

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

2.1.1 PnP.PowerShell

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

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions