Whether Teams bot can actively create group chat?

kkk 0 Reputation points
2023-06-12T03:16:59.94+00:00
	data := map[string]interface{}{
		"activity": map[string]interface{}{
			"type":       "message",
			"serviceUrl": "https://smba.trafficmanager.net/apac/",
			"channelId":  "msteams",
			"from": map[string]string{
				"id":   ts.BotId,
				"name": ts.BotName,
			},
			"locale": "zh-CN",
			"text":   "hello",
		},
		"bot":         map[string]string{"id": ts.BotId, "name": ts.BotName, "role": "bot"},
		"channelData": nil,
		"isGroup":     true,
		"members": []map[string]string{{
			"aadObjectId": member.ObjectId,
			"id":          member.Id,
			"name":        member.Name,
			"role":        "user",
		}, {
			"aadObjectId": member2.ObjectId,
			"id":          member2.Id,
			"name":        member2.Name,
			"role":        "user",
		},
		},
		"tenantId":  ts.TenantID,
		"topicName": "testtttt",
	}

i try https://learn.microsoft.com/zh-cn/azure/bot-service/rest-api/bot-framework-rest-connector-api-reference?view=azure-bot-service-4.0#create-conversation, but get {"error":{"code":"BadSyntax","message":"Incorrect conversation creation parameters"}}

I would like to ask if this feature can be implemented in the following? Or is there something wrong with my use?

Microsoft Teams | Development
Microsoft Security | Microsoft Graph
Microsoft Teams | Microsoft Teams for business | Other
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-07-06T05:34:52.0466667+00:00

    Creating group chats through Bot APIs is not supported. However, this can be accomplished with Graph APIs

    Create chat - Microsoft Graph v1.0 | Microsoft Learn

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.