Problem
The 'Data Acquisition Failure' Report will display a message(s) with a Failure Reason of 'Unexpected data!' when using the Microsoft Teams via WebHooks Importer.
Error Message
The Report will show the following error:
'Unexpected data! Unable to resolve Chat Id from resource: '/chats/getAllMessages'.

The Importer Log will show the following:
2022-06-08 03:00:59,144 [Connector_67] ERROR Webhook.MicrosoftTeams.WebhookTeamsManager - Could not process Payload Value of Notification with id dabf8d5b-f30f-40d0-a1a0-c6720c7f554c.
Globanet.Api.Core.ApiException: Unexpected data! Unable to resolve Chat Id from resource: '/chats/getAllMessages'. ---> System.ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
at System.String.Substring(Int32 startIndex, Int32 length)
at Webhook.MicrosoftTeams.Parsers.ResourceParser.ParseChatId(String resource)
--- End of inner exception stack trace ---
at Webhook.MicrosoftTeams.Parsers.ResourceParser.ParseChatId(String resource)
at Webhook.MicrosoftTeams.Parsers.RecipientsParser.GetRecipients(String resource)
at Webhook.MicrosoftTeams.WebhookTeamsManager.ProcessPayloadValue(Notification`1 notification, NotificationPayloadValue payloadValue, IntermediateMessage tempMessage, DateTime historyDate)
Cause
In Teams via Webhooks, MS Teams sends a copy of each message to the Globanet Portal. The Merge1 importer then collects the message from the Globanet Portal. This issue can occur when the message sent has a corrupt header or tag. The corrupt header is missing certain conversation thread information. (i.e. Channel ID, Team ID, Chat ID). As a result the Importer is unable to identify which thread the message belongs to and errors out.
Solution
To resolve this issue provide the associated Importer log and the Contents from exporting the message from the report. Then open a support case for further verification and steps to clear the report.
