Creating Team using a service principal










1















Using the PowerShell module for Microsoft Teams 0.9.5 we are authenticating successfully using a registered Application Principal and a certificate.



When trying to perform creation of a new Team using the New-Team cmdlet,



Connect-MicrosoftTeams -TenantId $TenantId -ApplicationId $AppClientId -CertificateThumbprint $cert.Thumbprint

New-Team -DisplayName "Team1" -Alias "Team1" -AccessType Public -AddCreatorAsMember $false


it always returns error as below



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


Creating a new Team/Group via this module, which uses Office Graph APIs behind the scenes, is stated as supported by the official documentation




Examples of group features that support delegated and app-only permissions:



- Creating and deleting groups




From:
https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues










share|improve this question




























    1















    Using the PowerShell module for Microsoft Teams 0.9.5 we are authenticating successfully using a registered Application Principal and a certificate.



    When trying to perform creation of a new Team using the New-Team cmdlet,



    Connect-MicrosoftTeams -TenantId $TenantId -ApplicationId $AppClientId -CertificateThumbprint $cert.Thumbprint

    New-Team -DisplayName "Team1" -Alias "Team1" -AccessType Public -AddCreatorAsMember $false


    it always returns error as below



    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


    Creating a new Team/Group via this module, which uses Office Graph APIs behind the scenes, is stated as supported by the official documentation




    Examples of group features that support delegated and app-only permissions:



    - Creating and deleting groups




    From:
    https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues










    share|improve this question


























      1












      1








      1


      1






      Using the PowerShell module for Microsoft Teams 0.9.5 we are authenticating successfully using a registered Application Principal and a certificate.



      When trying to perform creation of a new Team using the New-Team cmdlet,



      Connect-MicrosoftTeams -TenantId $TenantId -ApplicationId $AppClientId -CertificateThumbprint $cert.Thumbprint

      New-Team -DisplayName "Team1" -Alias "Team1" -AccessType Public -AddCreatorAsMember $false


      it always returns error as below



      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


      Creating a new Team/Group via this module, which uses Office Graph APIs behind the scenes, is stated as supported by the official documentation




      Examples of group features that support delegated and app-only permissions:



      - Creating and deleting groups




      From:
      https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues










      share|improve this question
















      Using the PowerShell module for Microsoft Teams 0.9.5 we are authenticating successfully using a registered Application Principal and a certificate.



      When trying to perform creation of a new Team using the New-Team cmdlet,



      Connect-MicrosoftTeams -TenantId $TenantId -ApplicationId $AppClientId -CertificateThumbprint $cert.Thumbprint

      New-Team -DisplayName "Team1" -Alias "Team1" -AccessType Public -AddCreatorAsMember $false


      it always returns error as below



      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


      Creating a new Team/Group via this module, which uses Office Graph APIs behind the scenes, is stated as supported by the official documentation




      Examples of group features that support delegated and app-only permissions:



      - Creating and deleting groups




      From:
      https://developer.microsoft.com/en-us/graph/docs/concepts/known_issues







      microsoft-graph microsoft-teams






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 14 '18 at 8:16







      Massimo Prota

















      asked Nov 13 '18 at 9:12









      Massimo ProtaMassimo Prota

      1,046611




      1,046611






















          1 Answer
          1






          active

          oldest

          votes


















          0














          The Teams Graph APIs support application permissions, the Teams PowerShell cmdlets do not. The logic for acquiring a token is different for user delegated versus application permissions.






          share|improve this answer























          • I have tried 're-playing' the creation of a new Team, replacing the access token with that one acquired for a service principal; but the end result has been that I only have an half-baked Exchange object, and nothing in Teams

            – Massimo Prota
            Nov 16 '18 at 19:52











          • new-team makes two different Graphical -- one to create group, a second to put a team in it. developer.microsoft.com/en-us/graph/docs/concepts/… describes how to do this.

            – Nick Kramer - MSFT
            Nov 18 '18 at 23:47










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53277464%2fcreating-team-using-a-service-principal%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          The Teams Graph APIs support application permissions, the Teams PowerShell cmdlets do not. The logic for acquiring a token is different for user delegated versus application permissions.






          share|improve this answer























          • I have tried 're-playing' the creation of a new Team, replacing the access token with that one acquired for a service principal; but the end result has been that I only have an half-baked Exchange object, and nothing in Teams

            – Massimo Prota
            Nov 16 '18 at 19:52











          • new-team makes two different Graphical -- one to create group, a second to put a team in it. developer.microsoft.com/en-us/graph/docs/concepts/… describes how to do this.

            – Nick Kramer - MSFT
            Nov 18 '18 at 23:47















          0














          The Teams Graph APIs support application permissions, the Teams PowerShell cmdlets do not. The logic for acquiring a token is different for user delegated versus application permissions.






          share|improve this answer























          • I have tried 're-playing' the creation of a new Team, replacing the access token with that one acquired for a service principal; but the end result has been that I only have an half-baked Exchange object, and nothing in Teams

            – Massimo Prota
            Nov 16 '18 at 19:52











          • new-team makes two different Graphical -- one to create group, a second to put a team in it. developer.microsoft.com/en-us/graph/docs/concepts/… describes how to do this.

            – Nick Kramer - MSFT
            Nov 18 '18 at 23:47













          0












          0








          0







          The Teams Graph APIs support application permissions, the Teams PowerShell cmdlets do not. The logic for acquiring a token is different for user delegated versus application permissions.






          share|improve this answer













          The Teams Graph APIs support application permissions, the Teams PowerShell cmdlets do not. The logic for acquiring a token is different for user delegated versus application permissions.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 16 '18 at 17:53









          Nick Kramer - MSFTNick Kramer - MSFT

          512




          512












          • I have tried 're-playing' the creation of a new Team, replacing the access token with that one acquired for a service principal; but the end result has been that I only have an half-baked Exchange object, and nothing in Teams

            – Massimo Prota
            Nov 16 '18 at 19:52











          • new-team makes two different Graphical -- one to create group, a second to put a team in it. developer.microsoft.com/en-us/graph/docs/concepts/… describes how to do this.

            – Nick Kramer - MSFT
            Nov 18 '18 at 23:47

















          • I have tried 're-playing' the creation of a new Team, replacing the access token with that one acquired for a service principal; but the end result has been that I only have an half-baked Exchange object, and nothing in Teams

            – Massimo Prota
            Nov 16 '18 at 19:52











          • new-team makes two different Graphical -- one to create group, a second to put a team in it. developer.microsoft.com/en-us/graph/docs/concepts/… describes how to do this.

            – Nick Kramer - MSFT
            Nov 18 '18 at 23:47
















          I have tried 're-playing' the creation of a new Team, replacing the access token with that one acquired for a service principal; but the end result has been that I only have an half-baked Exchange object, and nothing in Teams

          – Massimo Prota
          Nov 16 '18 at 19:52





          I have tried 're-playing' the creation of a new Team, replacing the access token with that one acquired for a service principal; but the end result has been that I only have an half-baked Exchange object, and nothing in Teams

          – Massimo Prota
          Nov 16 '18 at 19:52













          new-team makes two different Graphical -- one to create group, a second to put a team in it. developer.microsoft.com/en-us/graph/docs/concepts/… describes how to do this.

          – Nick Kramer - MSFT
          Nov 18 '18 at 23:47





          new-team makes two different Graphical -- one to create group, a second to put a team in it. developer.microsoft.com/en-us/graph/docs/concepts/… describes how to do this.

          – Nick Kramer - MSFT
          Nov 18 '18 at 23:47

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53277464%2fcreating-team-using-a-service-principal%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          How to read a connectionString WITH PROVIDER in .NET Core?

          In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

          Museum of Modern and Contemporary Art of Trento and Rovereto