Using the Microsoft graph API, I'm getting webhook notifications for each MS Teams message. When a message with a file attachment is received in the following format:
"attachments": [
{
"id": "aa567f71-4702-4b43-b756-2f453ddb662a",
"contentType": "reference",
"contentUrl": "... the url",
"content": null,
"name": "my file.xlsm",
"thumbnailUrl": null
}
],
I'm trying to then call the graph API to retrieve the file information and perform operations on it (specifically delete) using the id above (https://graph.microsoft.com/v1.0/groups/" + teamId + "/drive/items/" + id) and getting an error (The resource could not be found). I'm guessing that the id I'm getting in the attachment isn't the file item ID. Is there a way I can get the item ID from the attachment ID using the graph API?