Microsoft Graph Create a Team get Error
I read this page about Crete a Team: https://learn.microsoft.com/en-us/graph/api/team-post?view=graph-rest-1.0&tabs=java%2Chttp, but I got this error whit the postman.
-URL Postman: https://www.postman.com/microsoftgraph/workspace/microsoft-graph/collection/455214-085f7047-1bec-4570-9ed0-3a7253be148c/fork
Example 1: Delegated permissions
{
"template@odata.bind": "https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName": "My Sample Team",
"description": "My Sample Team’s Description"
}
Response:
Status: 400
Body:
{
"error": {
"code": "BadRequest",
"message": "Failed to execute Templates backend request CreateTeamFromTemplateRequest. Request Url: https://teams.microsoft.com/fabric/emea/templates/api/team, Request Method: POST, Response Status Code: BadRequest, Response Headers: Strict-Transport-Security: max-age=2592000\r\nx-operationid: 03e6994c17b0124cb03d314190fadf01\r\nx-telemetryid: 00-03e6994c17b0124cb03d314190fadf01-240b8f985f59824b-00\r\nX-MSEdge-Ref: Ref A: 43BFA883886944ABB860374DAEEBCEC2 Ref B: LON21EDGE0511 Ref C: 2021-07-20T15:28:59Z\r\nDate: Tue, 20 Jul 2021 15:28:58 GMT\r\n, ErrorMessage : {\"errors\":[{\"message\":\"A team owner must be provided when creating a team in application context.\",\"errorCode\":\"Unknown\"}],\"operationId\":\"03e6994c17b0124cb03d314190fadf01\"}",
"innerError": {
"date": "2021-07-20T15:28:59",
"request-id": "08f8b05c-186d-4d33-948e-9cf97bcf6f75",
"client-request-id": "08f8b05c-186d-4d33-948e-9cf97bcf6f75"
}
}
}
After that I modifed the code, but I get other error: Error when calling Middle Tier, my question is how fix this error and why got this error.
{
"template@odata.bind":"https://graph.microsoft.com/v1.0/teamsTemplates('standard')",
"displayName":"My Sample Team",
"description":"My Sample Team’s Description",
"members":[
{
"@odata.type":"#microsoft.graph.aadUserConversationMember",
"roles":[
"owner"
],
"user@odata.bind":"https://graph.microsoft.com/v1.0/users('xxxxe940d-fe14-4775-8aa9-xxx')"
}
]
}
Response:
Status: 404
Body:
{
"error": {
"code": "NotFound",
"message": "Failed to execute Templates backend request CreateTeamFromTemplateRequest. Request Url: https://teams.microsoft.com/fabric/emea/templates/api/team, Request Method: POST, Response Status Code: NotFound, Response Headers: Strict-Transport-Security: max-age=2592000\r\nx-operationid: a62ddd19bfc898429e341cc2e0f26527\r\nx-telemetryid: 00-a62ddd19bfc898429e341cc2e0f26527-xxx-00\r\nX-MSEdge-Ref: Ref A: 9C399BECD18C4356837ECF01EE3E2C34 Ref B: VIEEDGE3014 Ref C: 2021-07-20T15:22:02Z\r\nDate: Tue, 20 Jul 2021 15:22:02 GMT\r\n, ErrorMessage : {\"errors\":[{\"message\":\"Error when calling Middle Tier. Message: ''. Error code: 'NotFound'. Status code: NotFound.\",\"errorCode\":\"Unknown\"}],\"operationId\":\"a62ddd19bfc898429e341cc2e0f26527\"}",
"innerError": {
"date": "2021-07-20T15:22:03",
"request-id": "84097822-8281-4d29-b2ee-7aa34c42340f",
"client-request-id": "84097822-8281-4d29-b2ee-7aa34c42340f"
}
}
}