OfficeDev / teams-toolkit

Developer tools for building Teams apps
Other
457 stars 187 forks source link

Team Mobile Notifications from Microsft Graph (sendactivitynotification) not working #4047

Open YorkeNW06 opened 2 years ago

YorkeNW06 commented 2 years ago

We are sending notifications to users through graph. However, in the production version of our app the desktop notifications work but the mobile notifications do not. In our beta/test version of the app both desktop and mobile notifications work.

The only difference that I can think of is

  1. A different Azure Ad App registration

  2. The production version of the teams app is deployed though the store, while the beta/test version of the app is sideloaded.

Both the production and the beta/test version of the app make the same Microsoft Graph call to send notifications, but to different client ids.

https://docs.microsoft.com/en-us/graph/api/userteamwork-sendactivitynotification?view=graph-rest-1.0&tabs=http

ghost commented 2 years ago

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

adashen commented 2 years ago

@YorkeNW06 The issue seems more related to graph api settings. So new issue was created at https://github.com/microsoftgraph/microsoft-graph-docs-contrib/issues/2419 to Graph API team as dependency.

adashen commented 2 years ago

From the linked bug: @YorkeNW06 Can you please share a request-id and timestamp pairing of a call to the API that has notification show up in desktop but not mobile? This would help us debug what may be going on.

YorkeNW06 commented 2 years ago

@adashen Here is a full trace of a graph call we made. Thanks!

Request-Id = b18a4b9f-c6f7-4b00-8201-689129c5b992 Timestamp = Wed, 02 Mar 2022 14:54:11 GMT

Base Address https://graph.microsoft.com/ Request Uri v1.0/users/a57a464e-71f6-4019-84b4-86acfd710047/teamwork/sendActivityNotification Full Url https://graph.microsoft.com/v1.0/users/a57a464e-71f6-4019-84b4-86acfd710047/teamwork/sendActivityNotification Method POST Request Header Accept-Encoding - gzip Request Header Authorization - Bearer eyJ0eXAiOiJKV1QiLCJub25jZSI6IjVMYzV3cUpWYXVVOU5lQlNKZVg4ZWp6UHhsYXdPak9GUzZhRjEzU3EzZjgiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCIsImtpZCI6Ik1yNS1BVWliZkJpaTdOZDFqQmViYXhib1hXMCJ9.eyJhdWQiOiJodHRwczovL2dyYXBoLm1pY3Jvc29mdC5jb20iLCJpc3MiOiJodHRwczovL3N0cy53aW5kb3dzLm5ldC84MjIyNjc2My1mNTI2LTQ4NTgtYTEwOC1lMDUxN2MyYWFiNDEvIiwiaWF0IjoxNjQ2MjMyNTUxLCJuYmYiOjE2NDYyMzI1NTEsImV4cCI6MTY0NjIzNjQ1MS... Request Header Content-Type - application/json Request Content {"topic":{"@odata.type":"#microsoft.graph.teamworkActivityTopic","source":"text","value":"New text message","webUrl":"https://teams.microsoft.com/l/entity/f56c551e-73cc-4416-a977-482fdfde966f/textingtab?context={\"subEntityId\":\"1b358864-f756-47dd-9f78-7612d7897282\"}"},"activityType":"textReceived","chainId":5178567095741679716,"previewText":{"content":"Trst","contentType":"text"},"templateParameters":[{"name":"from","value":"Nathan"}],"recipient":null} Response Received 03/02/2022 14:54:12 +00:00 (813ms) Read 03/02/2022 14:54:12 +00:00 (0ms) Response Header Strict-Transport-Security - max-age=31536000 Response Header request-id - b18a4b9f-c6f7-4b00-8201-689129c5b992 Response Header client-request-id - b18a4b9f-c6f7-4b00-8201-689129c5b992 Response Header x-ms-ags-diagnostic - {"ServerInfo":{"DataCenter":"North Central US","Slice":"E","Ring":"3","ScaleUnit":"005","RoleInstance":"CH01EPF000051E2"}} Response Header Date - Wed, 02 Mar 2022 14:54:11 GMT Response Message No Content Response Status 204 Response Content Deserialization Start 03/02/2022 14:54:12 +00:00 Deserialization End 03/02/2022 14:54:12 +00:00 (0ms) Finished 03/02/2022 14:54:12 +00:00 (813.8606ms)