OfficeDev / microsoft-teams-apps-company-communicator

Company Communicator app template
MIT License
330 stars 403 forks source link

App published but users don't not receive messages and I can't download log using export log #1395

Closed MirianaRebeggianiSacmi closed 6 months ago

MirianaRebeggianiSacmi commented 7 months ago

We have both apps published, Author and User. It seems Author can't send messages correctly but the users never receive them. image

Futhermore, I can't download log file: image

When this method is executed: GET /api/draftnotifications/scheduledDrafts it gives a 401 error response image

Is there something we may have done wrong during the deployment? We have followed the guide.

gsv022 commented 7 months ago

Hi @MirianaRebeggianiSacmi , Thank you for raising the query. Could you please verify the graph-app authentication part is correctly done or not. Here is the reference.

MirianaRebeggianiSacmi commented 7 months ago

Hi Sai Venkat! Yes I've checked it: image image image

gsv022 commented 7 months ago

Hi @MirianaRebeggianiSacmi , Please keep the permissions only which are mentioned in the deployment guide.

MirianaRebeggianiSacmi commented 7 months ago

Ok! I've removed "Profile" from permission. Now, I can export results, and I find this error: System.AggregateException: Failed to acquire token for client credentials. (AADSTS700016: Application with identifier '6944d981-0dd6-4957-99d6-eb23e9694ece' was not found in the directory 'd6d49420-f39b-4df7-a1dc-d59a935871db'. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant. Trace ID: 3a8dd88d-23b4-4af3-8bd6-6db53a274e00 Correlation ID: e74a6e36-c49d-4435-8939-ffcf7485777a Timestamp: 2024-04-05 09:51:04Z)

But in the Company Communicator doensn't show again the number of recipients: image It shows 0 instead of 5

gsv022 commented 7 months ago

Hi @MirianaRebeggianiSacmi , We suspect that secrets are incorrectly configured. Here is the procedure for comparison.

MirianaRebeggianiSacmi commented 7 months ago

The secret are corret, I've make a mistake in the config of "users" registration. I've correct it, but still not working, different message of error: 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.<b__0>d.MoveNext() in C:\home\site\repository\Source\CompanyCommunicator.Common\Services\Teams\Messages\MessageService.cs:line 94 Now I see the correct number of recepients.

gsv022 commented 7 months ago

Please share your mail id so that we can schedule the call and discuss the issue interally

MirianaRebeggianiSacmi commented 7 months ago

My email is miriana.rebeggiani@sacmigroup.com

gsv022 commented 7 months ago

We are following the issue internally

gsv022 commented 6 months ago

Thanks for joining the call. Here is the summary. During the call it is observed that messages are not getting delivered through any of the sending option. First and second options are giving the error as "Couldn't find any matches"

It takes some time for the changes in admin center to reflect in teams. Give 24hrs of time and then try sending messages. Please keep us posted

microsoft-github-policy-service[bot] commented 6 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

microsoft-github-policy-service[bot] commented 6 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.