web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Creating a Team from P...
Power Apps
Answered

Creating a Team from PowerApps Runtime Error

(0) ShareShare
ReportReport
Posted on by 58

Hello,

 

I was trying to use the Microsoft Teams Connector to create a Team from inside a canvas app. The team seems to get created, but I'm getting a run-time error (am trying to retrieve the ID of the created team). This is my code OnSelect:

 

Set(createdTeam,MicrosoftTeams.CreateATeam("Test Team", "This is a test of creating a Team from PowerApps"))

 

Runtime error is:

MicrosoftTeams.CreateATeam failed: The data returned in the response is invalid. Response data should be a valid JSON object.

 

This is probably something simple I'm missing, but I can't seem to find any answers. Appreciate any help. Thanks!

Categories:
I have the same question (0)
  • Verified answer
    MarvinBangert Profile Picture
    1,924 Most Valuable Professional on at

    Hey @knoxknnocks,

    I get the same error when trying to do this, the team is created but you still see an error in the formular. Even when adding the return "newTeamId", the error still occures. From the docs the return should be the "New Team ID": Microsoft Teams - Connectors | Microsoft Docs

     

    I only remember this error message from a missing declaration in the header for "Accept application/json" (in a custom connector), but this is inside the connector itself, so you could not change it. If this is not declared, the data returns as XML and the app cannot work with this return.

     

    If nobody else has an idea, I would open a support ticket, just in case this is a problem within the connector itself.

     

    @WarrenBelz 

    @RandyHayes 

    Could you have a look on this?

     

    Best regards
    Marvin

    If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

  • knoxknnocks Profile Picture
    58 on at

    Hi @MarvinBangert sorry I missed your reply. Thanks for that!

     

    For now, I'm just living with the issue and retrieve the group id using a filter on all teams after based on the unique team names that we are creating. I'll open a support ticket once it becomes unbearable!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 380 Most Valuable Professional

#2
Kalathiya Profile Picture

Kalathiya 340

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 333 Super User 2025 Season 2

Last 30 days Overall leaderboard