Open
Description
Reporting an Issue or Missing Feature
Creating a new MS Team using New-PnPTeamsTeam
Expected behavior
Return value = the created team object with properties like GroupId to continue modifying this team (adding channels, getting SiteURL to set sharing policies, ...)
Actual behavior
Return value on Azure Automation = $null
Steps to reproduce behavior
- Create app registration with Groups.ReadWrite.All app-only permission
- Run this code:
Connect-PnPOnline <url> -ManagedIdentity
$team = New-PnPTeamsTeam -DisplayName "doesn't matter" -MailNickName "doesn't matter" -Description "doesn't matter" -Visibility Public -Owners "myuserupn" -Members "myuserupn"
Write-Output "Created team $team"
$team will be $null.
This works on 3.1 and 2.12.0 in my VS Code console (not on Azure Automation). Even works on my local Azure Automation job.
What is the version of the Cmdlet module you are running?
Azure Automation only allows 2.12.0, so that's the version that has the issue.
Which operating system/environment are you running PnP PowerShell on?
- Windows
- Azure Automation