microsoft-teams-apps-company-communicator: Bot fails to send a message to a user

We are testing our second Company Communicator to smalls groups and found that the bot was unable to send the message to some users.

We have tried sending with the option “Sent in chat to people in teams” and “Sent in chat to members of the following groups” with the same result. We have tried cleaned Teams cache and problem persists.

Version App: Version 5.4.1

The error report is details below:

User ID,UPN,Name,User Type,Delivery Status,Status Reason,Error

3adde888-7b8a-4ce8-hhhhhhhhhhhhh,yyyyyyyyy@xxxxxxx.com, zzzzzzzzzzzzz,Member,Failed,403 : Failed,“Microsoft.Bot.Schema.ErrorResponseException: Operation returned an invalid status code ‘Forbidden’ at Microsoft.Bot.Connector.Conversations.ReplyToActivityWithHttpMessagesAsync(String conversationId, String activityId, Activity activity, Dictionary2 customHeaders, CancellationToken cancellationToken) at Microsoft.Bot.Connector.ConversationsExtensions.ReplyToActivityAsync(IConversations operations, String conversationId, String activityId, Activity activity, CancellationToken cancellationToken) at Microsoft.Bot.Builder.CloudAdapterBase.SendActivitiesAsync(ITurnContext turnContext, Activity[] activities, CancellationToken cancellationToken) at Microsoft.Bot.Builder.TurnContext.<>c__DisplayClass31_0.<<SendActivitiesAsync>g__SendActivitiesThroughAdapter\|1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.Bot.Builder.TurnContext.SendActivityAsync(IActivity activity, CancellationToken cancellationToken) at Microsoft.Teams.Apps.CompanyCommunicator.Common.Services.Teams.MessageService.<>c__DisplayClass3_1.<<SendMessageAsync>b__1>d.MoveNext() in C:\home\site\repository\Source\CompanyCommunicator.Common\Services\Teams\Messages\MessageService.cs:line 94 --- End of stack trace from previous location --- at Polly.Retry.AsyncRetryEngine.ImplementationAsync[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Func5 onRetryAsync, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider, Boolean continueOnCapturedContext) at Polly.AsyncPolicy.ExecuteAsync[TResult](Func`3 action, Context context, CancellationToken cancellationToken, Boolean continueOnCapturedContext) at Microsoft.Teams.Apps.CompanyCommunicator.Common.Services.Teams.MessageService.<>c__DisplayClass3_0.<<SendMessageAsync>b__0>d.MoveNext() in C:\home\site\repository\Source\CompanyCommunicator.Common\Services\Teams\Messages\MessageService.cs:line 94” df771efa-d816-4af9-9336-xxxxxxxxx,yyyyyyyyy2@zzzzzz.com,xyz ,Member,Succeeded,201 : OK,

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

Dear Team, Just to update that, we find out that the app was unavailable to few users due to custom App policy was enabled for users, due to that global org policy was not applied to them. We disabled all test policy and tried to send message to everyone, and it sends to all without any failure. Hope this may work for you as well.

PS: it may take up to 24 hours to rollout the updated policy for users.

Sorry, I thought as a collaborator you could see the id masked.

My email is: merinostuff@gmail.com

Thanks