Forum Discussion
AddAsync(team) returns null even though this is supposed to be the preferred way to create a Team no
Hello.
I'm using the nuget package (beta):
Teams.Request().AddAsync still doesn't return the newly created team or at the very least the id. I can't access the headers via the nugget package either and therefore can't get the teamid as if I was to just use HttpClient.
My only option is to create group then convert that to a team - however the doc state that this will be deprecated soon. It also states the following "This API is in the process of being deprecated in favor of Create team, and will be removed by the end of 2019." (https://docs.microsoft.com/en-us/graph/api/team-put-teams?view=graph-rest-beta&tabs=http) - we are nearly at the end of 2020.
When will Teams.Request().AddAsync return the id / team object?
Thanks
Mark
- Trinetra-MSFTMicrosoft
marksqeptech , You should try await graphClient.Groups["{id}"].Team .Request() .PutAsync(team); to create team in Group
- marksqeptechCopper Contributor
Hello - thanks for your reply.
I don't want to have to create a group then convert it to a team.
I'm wanting to use Teams.Request().AddAsync to create a new team but it doesn't return the new team or team id - is this something that is going to be fixed soon?
- Trinetra-MSFTMicrosoft
marksqeptech , This is expected behavior AFAIK, You can follow the code snippet that is mentioned in the document