Microsoft Teams Graph API - Invalid bind property name owners in request

Stack Overflow Asked on December 5, 2020

I’m currently having major issues with creating teams from the Graph API. I was initially trying to create teams based on groups, however I have found out today that you can now create a team without creating a group first then waiting 15 minutes to then create the team from the following link. This would make things considerably simpler.

I am using the Microsoft.Graph SDK (v3.12.0 released 26th Aug) so replicated the http call using the SDK as follows.

        var team = new Team
            DisplayName = "My Group Name",
            Description = "My Group Description",
            AdditionalData = new Dictionary<string, object>()
                {"[email protected]", "'educationClass')"},
                {"[email protected]", $"["'{usersGuid}')"]"}

        var response = await _graphClient.Teams

The code above gives a:

[16:14:01 ERR] An unhandled exception has occurred while executing the request.
Status Code: BadRequest
Microsoft.Graph.ServiceException: Code: BadRequest
Message: Invalid bind property name owners in request.

If I remove the line

{"[email protected]", $"["'{usersGuid}')"]"}

from the code I get the following:

ErrorMessage : {"errors":[{"message":"A team owner must be provided when creating a team in application context."}]

Any advice would be greatly appreciated.


One Answer

In v1.0 the owners relationship is not currently present, so you have to use the beta endpoint. POST:

with the following body format

{ "[email protected]":"'standard')", "displayName":"Test Team", "description":"Test description", "[email protected]":["{user guid}"] }

Note: the user guid should also be bare, i.e without the brackets and quotes in your example.

Correct answer by David on December 5, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP