Start conversation in a teams tab programmatically using Graph API or Bot framework

Clark Kent 1 Reputation point
2022-01-29T06:56:02.847+00:00

Hello

Is there a way to start the conversation in a Teams tab using graph API? Basically, if we click on the 'Start conversation' button it will create conversation, but I want to do it programmatically.
Also, can we change the size of the chat section in a tab? (The horizontal width specifically)

I would need an API for starting the conversation inside the team's tab. Not to post a message in the team's channel.
Once I start a conversation in the tab programmatically, the message will automatically come into the channel as well.

Please check this link.
https://support.microsoft.com/en-us/office/start-a-conversation-about-a-tab-in-teams-949a39e6-bde5-47f5-8e25-398a2ce009f9

I want to do the above action via some API call.

Thanks
CK

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,908 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AtulThorat-MSFT 391 Reputation points
    2022-02-10T21:59:24.36+00:00

    Hi @Clark Kent ,

    We can create Custom Chat Bot and Publish it as App in Microsoft Team.

    Please use below Microsoft article to create and Publish Bot using Power Virtual Agent.

    authoring-first-bot

    We are having different options in this
    1] Create and edit topics
    authoring-create-edit-topics-teams
    2] Enhance your bot
    advanced-fundamentals-teams
    3] Publish your bot
    publication-fundamentals-publish-channels-teams
    4] Using analytics to improve your bot
    analytics-overview-teams
    In my test tenant I have created "Test Bot" and Published it.
    Please find below Screenshot for the same.

    173301-pva-login.png

    173288-pva-country.png!

    173230-pva-createbot.png

    173160-pva-created.png

    173311-pva-topic.png

    173277-pva-publish.png

    173278-pva-published.png

    Once Chat bot is Published we have to add a chatbot to Microsoft Teams using the Teams app.

    Please find below Microsoft article for the same.

    publication-add-bot-to-microsoft-teams

    So we have to make some changes in Chat Bot Setting as mentioned in above Microsoft article. I have made these changes in My chat bot. Please find some of them in below screenshot.

    173302-pva-settings.png

    Once request is submitted it will sent to Team admin for "Approval" as shown below.

    173266-pva-approval.png

    After that "Teams Admin" need to open below link

    admin.teams.microsoft.com

    Now Teams admin will Approve this request.

    173289-pva-admin.png

    173267-pva-admin1.png

    Open teams.microsoft.com. In left navigation click on "App Studio". Then Click on "Manage Your Apps". Again click on "Submit an app to your org". Please find below screenshot of the same.

    173313-app-store.png

    173314-app-store-approved.png

    Once it is Approved by "Teams Admin" we can use this Custom Chat Bot in our Microsoft Team and can start conversation in a teams tab programmatically using Bot framework.

    173180-testbot.png

    173268-testbot1.png

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments