Microsoft Tech Community Live:  Microsoft Teams Edition
November 09, 2021, 08:00 AM - 12:00 PM (PST)

Adaptive Card, Copy/Paste/Share functionality

%3CLINGO-SUB%20id%3D%22lingo-sub-2845764%22%20slang%3D%22en-US%22%3EAdaptive%20Card%2C%20Copy%2FPaste%2FShare%20functionality%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2845764%22%20slang%3D%22en-US%22%3E%3CP%3EMS%20Teams%20application%20...%3C%2FP%3E%3CP%3EI%20send%20Adaptive%20Card%20to%20the%20client%20and%20Bot%20handles%20card%20actions.%20How%20can%20I%20add%2Fimplement%20copy-paste%20functionality%3F%3C%2FP%3E%3COL%3E%3CLI%3EClient%20will%20copy%20the%20card%20to%20the%20clipboard%20and%20send%20it%20to%20a%20different%20client.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EP.S.%3A%20I%20implemented%20%22Link%20unfurling%22%20functionality%20and%20can%20see%20%22Copy%22%20menu%20button%20but%20there%20is%20no%20one%20in%20the%20original%20Adaptive%20Card%20that%20I%20sent%20using%20ConnectorClient.Conversations.SendToConversationAsync(messageActivity).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EWhy%20there%20is%20no%26nbsp%3B%22Copy%22%20menu%20button%20in%20the%20original%20message.%20How%20can%20I%20add%20it%20or%20find%20workaround%20(additional%20button%2C%20or%20card%20link%20or%20unfurling%20or%20something%20else)%3F%26nbsp%3B%3C%2FLI%3E%3CLI%3EI%20created%20%22Share%20Message%22%20functionality%20using%20MessagingExtension%20(...%3D%26gt%3B%22More%20actions%22%20%3D%26gt%3B%20%22Share%20Message%22)%20and%20can%20display%20the%20card%20(unfurling)%20in%20the%20chat%20(can%20swith%20a%20client%20and%20send%20it)%20but%20how%20can%20I%20close%20the%20message%20%3F%20I%20can%20just%20close%20it%20using%20%22backspace%22%20button.%20It%20looks%20strange...%26nbsp%3B%26nbsp%3B%3C%2FLI%3E%3CLI%3EI%20thought%20that%20the%20actions%20of%20copied%20Adaptive%20Card%20won't%20work%20from%20a%20different%20channel%20(not%20Bot%2C%20Client%20to%20Client).%20But%20...%20I%20found%20that%20I%20can%20call%20card%20actions%20from%20a%20different%20channels%20(not%20Client-Bot%20chat)%20and%20bot%20handles%20the%20actions%20but%20...%20I%20send%20messages%20from%20the%20Bot%20(response)%20and%20can't%20see%20it%20in%20channel%20and%20...%20card%20displays%20%22%3CSPAN%3EUnable%20to%20reach%20app.%20Please%20try%20again.%3C%2FSPAN%3E%22%26nbsp%3B%20Bot%20catched%20the%20following%20exception%3A%20%22Operation%20returned%20an%20invalid%20status%20code%20'Forbidden'%22%2C%20Code%3A%26nbsp%3B%22BotNotInConversationRoster%22%2C%20%22The%20bot%20is%20not%20part%20of%20the%20conversation%20roster.%22%20Is%20it%20forbidden%3F%20How%20can%20I%20handle%20it%20(sending%20messages%20from%20the%20bot%20or%20display%20something%20or%20block%20sending%20answers%20(response)%20or%20I%20need%20to%20block%20actions%20from%20a%20different%20channels%20because%20it's%20unsupported)%3F%3C%2FLI%3E%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2845764%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EChat%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2847141%22%20slang%3D%22en-US%22%3ERe%3A%20Adaptive%20Card%2C%20Copy%2FPaste%2FShare%20functionality%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2847141%22%20slang%3D%22en-US%22%3EI%20will%20look%20at%20once%20internally%20and%20let%20you%20Know.%3C%2FLINGO-BODY%3E
New Contributor

MS Teams application ...

I send Adaptive Card to the client and Bot handles card actions. How can I add/implement copy-paste functionality?

  1. Client will copy the card to the clipboard and send it to a different client.

P.S.: I implemented "Link unfurling" functionality and can see "Copy" menu button but there is no one in the original Adaptive Card that I sent using ConnectorClient.Conversations.SendToConversationAsync(messageActivity).

 

  1. Why there is no "Copy" menu button in the original message. How can I add it or find workaround (additional button, or card link or unfurling or something else)? 
  2. I created "Share Message" functionality using MessagingExtension (...=>"More actions" => "Share Message") and can display the card (unfurling) in the chat (can swith a client and send it) but how can I close the message ? I can just close it using "backspace" button. It looks strange...  
  3. I thought that the actions of copied Adaptive Card won't work from a different channel (not Bot, Client to Client). But ... I found that I can call card actions from a different channels (not Client-Bot chat) and bot handles the actions but ... I send messages from the Bot (response) and can't see it in channel and ... card displays "Unable to reach app. Please try again."  Bot catched the following exception: "Operation returned an invalid status code 'Forbidden'", Code: "BotNotInConversationRoster", "The bot is not part of the conversation roster." Is it forbidden? How can I handle it (sending messages from the bot or display something or block sending answers (response) or I need to block actions from a different channels because it's unsupported)?
1 Reply

We are looking into the issue.We will update you.