cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
numark1
New Member

Post Adaptive Card into Teams Channel from ADO Work Item

Hi,

 

I tried to catch some data from a Work Item in DevOps into a Teams Channel with an Adaptive Card. I hoped that if I start with an easy Adaptive Card it will run smooth, but I have no clue what even the error is.

 

This is the workflow, Title and Description is from a ADO Work Item.

numark1_0-1631644982771.png

 

If the Flow gets triggered, the Error is:

 

Microsoft.Azure.ProcessSimple.Data.Entities.Exceptions.ProcessSimpleDataException: The specified Teams flowbot adaptive card request is missing or invalid. The tracking Id is '{0}'. ---> Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: d. Path 'body[1].text', line 12, position 53.
at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments)
at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) in X:\bt\1171240\repo\src\processsimple\Roles\ProcessSimple.Data\Components\AdaptiveCards\AdaptiveCardBuilder.cs:line 512
--- End of inner exception stack trace ---
at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) in X:\bt\1171240\repo\src\processsimple\Roles\ProcessSimple.Data\Components\AdaptiveCards\AdaptiveCardBuilder.cs:line 531
at Microsoft.Azure.ProcessSimple.Web.Common.Validation.BotAdaptiveCard(String card, RequestIdentity senderRequestIdentity) in X:\bt\1171240\repo\src\processsimple\Roles\ProcessSimple.Data\Common\Validation\BotValidation.cs:line 810

 

Raw Output:

 

{
    "statusCode"400,
    "headers": {
        "Pragma""no-cache",
        "x-ms-request-id""westcentralus:c0ef4d8b-14d1-4b83-b0c1-827ea05a9679",
        "x-ms-correlation-request-id""c0ef4d8b-14d1-4b83-b0c1-827ea05a9679",
        "x-ms-flow-mobile-ios-version""1.3.0",
        "x-ms-flow-routing-request-id""WESTCENTRALUS:20210914T184438Z:c0ef4d8b-14d1-4b83-b0c1-827ea05a9679",
        "Strict-Transport-Security""max-age=31536000; includeSubDomains",
        "X-Content-Type-Options""nosniff",
        "Timing-Allow-Origin""*",
        "x-ms-apihub-cached-response""true",
        "Cache-Control""no-cache",
        "Date""Tue, 14 Sep 2021 18:44:38 GMT",
        "Content-Length""1945",
        "Content-Type""application/json",
        "Expires""-1"
    },
    "body": {
        "error": {
            "code""InvalidJsonInBotAdaptiveCard",
            "message""Microsoft.Azure.ProcessSimple.Data.Entities.Exceptions.ProcessSimpleDataException: The specified Teams flowbot adaptive card request is missing or invalid. The tracking Id is '{0}'. ---> Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: d. Path 'body[1].text', line 12, position 53.\r\n   at Newtonsoft.Json.JsonTextReader.ParsePostValue(Boolean ignoreComments)\r\n   at Newtonsoft.Json.JsonTextReader.Read()\r\n   at Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings)\r\n   at Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options)\r\n   at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)\r\n   at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)\r\n   at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) in X:\\bt\\1171240\\repo\\src\\processsimple\\Roles\\ProcessSimple.Data\\Components\\AdaptiveCards\\AdaptiveCardBuilder.cs:line 512\r\n   --- End of inner exception stack trace ---\r\n   at Microsoft.Azure.ProcessSimple.Data.Components.AdaptiveCards.AdaptiveCardBuilder.DeserializeAdaptiveCard(String serializedAdaptiveCard, RequestIdentity requestor, CultureInfo cultureInfo, BotAdaptiveCardAtMentions atMentions) in X:\\bt\\1171240\\repo\\src\\processsimple\\Roles\\ProcessSimple.Data\\Components\\AdaptiveCards\\AdaptiveCardBuilder.cs:line 531\r\n   at Microsoft.Azure.ProcessSimple.Web.Common.Validation.BotAdaptiveCard(String card, RequestIdentity senderRequestIdentity) in X:\\bt\\1171240\\repo\\src\\processsimple\\Roles\\ProcessSimple.Data\\Common\\Validation\\BotValidation.cs:line 810"
        }
    }
}

 

 

1 REPLY 1
Porkai
Microsoft
Microsoft

I'm also getting same error when posting an adaptive card on any new PR creation from ADO, is there any fix for this issue

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (3,027)