Reputation: 37
I understand that to use the /attachments API, an id of the event or message which has an attachment needs to be passed. Can attachment data for an event or message be obtained without this dependency? For example, when I'm making a call to /events API for a particular user, along with events data for that user, can I also get attachment data associated with the event? I'm using client credentials flow.
Upvotes: 0
Views: 328
Reputation: 739
This is possible by explicitly specifying that you'd like to include attachments the response body using the OData expand query option.
In your case, the request URI would look as follows: https://graph.microsoft.com/v1.0/me/events?$expand=attachments
Upvotes: 1