title: Creating Team using a service principal
body: <p>Using the <a href="https://www.powershellgallery.com/packages/MicrosoftTeams/0.9.5" rel="nofollow noreferrer">PowerShell module for Microsoft Teams 0.9.5</a> we are authenticating successfully using a registered Application Principal and a certificate.</p>
  <p>When trying to perform creation of a new Team using the <code>New-Team</code> cmdlet,</p>
  <pre><code>Connect-MicrosoftTeams -TenantId $TenantId -ApplicationId $AppClientId -CertificateThumbprint $cert.Thumbprint
  
  New-Team -DisplayName &quot;Team1&quot; -Alias &quot;Team1&quot; -AccessType Public -AddCreatorAsMember $false
  </code></pre>
  <p>it always returns error as below</p>
  <pre><code>New-Team : Error occurred while executing
  Code: InvalidRequest
  Message: Team owner not found for e41cce9d-7e7e-45c9-979e-1b30a1c7e1cf.
  InnerError:
    RequestId: 50db5055-288b-407d-bb76-e3e50054631c
    DateTimeStamp: 2018-11-13T08:28:31
  HttpStatusCode: InvalidRequest
  </code></pre>
  <p>Creating a new Team/Group via this module, which uses Office Graph APIs behind the scenes, is stated as supported by the official documentation</p>
  <blockquote>
  <p><em>Examples of group features that support delegated <strong>and app-only permissions</strong>:</em></p>
  <p><em>- Creating and deleting groups</em></p>
  </blockquote>
  <p>From:
  <a href="https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues" rel="nofollow noreferrer">https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues</a></p>