question

GiovanniBianchetti-6827 avatar image
0 Votes"
GiovanniBianchetti-6827 asked Nivedipa-MSFT-6619 commented

teams send notification in feed 400 bad request

Good Morning,
I'm having some issues with Graph's Beta API.

I'm trying to send in the activity feed a notification using Postman.

Here my call:

 https://graph.microsoft.com/beta/users/{MY_USER_ID}/teamwork/sendActivityNotification


with its body:

 {
     "topic": {
         "source": "entityUrl",
         "value": "https://graph.microsoft.com/beta/users/{MY_COLLEGUE_USER_ID}/teamwork/installedApps/{MY_APP_ID}"
     },
     "activityType": "taskCreated",
     "previewText": {
         "content": "New Task Created"
     },
     "templateParameters": [
         {
             "name": "taskId",
             "value": "Task 12322"
         }
     ]
 }

I'm getting this error:

 {
     "error": {
         "code": "BadRequest",
         "message": "The value of the topic must match the graph resource path.",
         "innerError": {
             "date": "2021-03-03T13:27:56",
             "request-id": "ec5bc407-f3e9-49e4-9550-25a065635047",
             "client-request-id": "ec5bc407-f3e9-49e4-9550-25a065635047"
         }
     }
 }

I've already given all the required permission and followed the documentation step by step but I'm stuck at this...

I've already edited the app's manifest adding the "webApplicationInfo" paragraph:

   "webApplicationInfo":
   {
     "id": "{MY_APP_ID}",
     "resource": "https://localhost:44310/"
   },

and already registered "https://localhost:44310/" as redirect URL in AAD's register application authentication panel.

Thanks in advance for any effort and time you will spend helping me out,
Giovanni

office-teams-app-devmicrosoft-graph-notifications
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@GiovanniBianchetti-6827
As we are mainly responsible for general issue of Microsoft Teams, your question related to scripts is not in our scope. I will change office-teams-windows-itpro tag to office-teams-app-dev tag. Hope you get better response.

1 Vote 1 ·

Outside of your application, can you repro the issue with Graph Explorer/POSTMAN as well?

0 Votes 0 ·

The problem is with both Postman and my app.
I wanted to make the call stable than implement it in my app.

0 Votes 0 ·

Hi @GiovanniBianchetti-6827,

Thanks for reaching us!

I know you already had followed the documents, but still could you please refer this document. I believe this would solve your query and will get more idea on sending activity feed notifications to users.


0 Votes 0 ·
RamaMohanaCharyAkavarapu-4424 avatar image
0 Votes"
RamaMohanaCharyAkavarapu-4424 answered MashkoorBabarLexisNexisDevelopment-6030 commented

Posting the Answer for better knowledge
Copying from comments

Hi @GiovanniBianchetti-6827,

Thanks for reaching us!

I know you already had followed the documents, but still could you please refer this document. I believe this would solve your query and will get more idea on sending activity feed notifications to users.



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @GiovanniBianchetti-6827,

did you manage to work this out yet? I'm facing the exact same problem and I cannot figure it out.

Thanks!

Regards,
Paul

0 Votes 0 ·

are you able to resolve that issue, facing the same issue

0 Votes 0 ·
MashkoorBabarLexisNexisDevelopment-6030 avatar image
0 Votes"
MashkoorBabarLexisNexisDevelopment-6030 answered Nivedipa-MSFT-6619 commented

Hi, I followed the document without any luck. getting the following error

Seems like App Studio removes the activities section of manifest file.

Code: BadRequest
Message: The value of the topic must match the graph resource path.
Inner error:
AdditionalData:
date: 2022-06-16T15:18:16
request-id: c121f3c5-fb00-4f1f-a526-b0b2aceeaaf3
client-request-id: c121f3c5-fb00-4f1f-a526-b0b2aceeaaf3
ClientRequestId: c121f3c5-fb00-4f1f-a526-b0b2aceeaaf3

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

In addition, it seems like APP Studio remove the Activities section of manifest file

0 Votes 0 ·
Nivedipa-MSFT-6619 avatar image Nivedipa-MSFT-6619 MashkoorBabarLexisNexisDevelopment-6030 ·

@MashkoorBabarLexisNexisDevelopment-6030, @GiovanniBianchetti-6827 - We have tested this using App studio. We have imported below manifest zip which contains activities section via App studio in Teams. The activities section is missing from app manifest. We have raised a bug for it. We will inform you once we have any updates

213433-manifest.txt


0 Votes 0 ·
manifest.txt (2.5 KiB)