microsoft-graph-apimicrosoft-graph-teamsmicrosoft-graph-edu

Team id response when creating team


This questions concerns the beta endpoint in Microsoft Graph. Creating teams with the beta endpoint is great because of less calls to the API and I can add from a template. I can't wait till this is available in v1.0.

But I wonder why there is no response object when creating a team this way. I get an OK/success response, but no data. I would like to get a team object or at least a team-id or a reference to use to get to the team when the actual creation is completed.

The reason why I'd like this is that it doesn't seem like the creation request accepts more than one owner in "owners@odata.bind". And on top of this, it seems like the "members@odata.bind" is not recognized. So I need to add more owners (teachers) and members (students).

In addition, I'd like to set a team photo after creation complete. And...I need the team id in my app.

I am adding teams from template "educationClass" at this point.

Any ideas?


Solution

  • It's stated in the documentation that even if the team creation request returns an OK/success response with no content, it also returns the Location header with reference to both team and the teamsAsyncOperation, which in my case solve the problem.