1
votes

We have an issue accessing the attachment(s) of an event created in a O365 Group when using the Graph. The event is created in the group calendar, the group is set to public and can be accessed by the user requesting the event. Using the Graph Explorer we can access the event by using the following: https://graph.microsoft.com/v1.0/groups/groupid/events/eventid

However using the: https://graph.microsoft.com/v1.0/groups/groupid/events/eventid/attachments results in a 403 error:

{
"error": {
    "code": "ErrorAccessDenied",
    "message": "Access is denied. Check credentials and try again.",
    "innerError": {
        "request-id": "af65c3ce-6f00-4137-817b-fa1a069d820e",
        "date": "2018-08-06T09:02:26"
        }
    }
}

The issue can be replicated in either using the Graph Explorer or any other method. Obviously we have checked the permissions and Calendar.Read has been applied, but even after checking all permissions boxes available in the Graph Explorer (or AD App Registration) a 403 still occurs regardless of the selected permissions.

Any call to the attachment endpoint results in a success for events that are in a user’s calendar and it seems to be only occurring when retrieving events for a group. There seems no changes in behavior whether the group is public or private, nor using either the /beta or the /v1.0 endpoint.

The intellisense in the graph explorer does shows /attachment to be an option but always return a 403 when requested.

Any insights or tips on how to retrieve attachements for events created in a group would great.

2

2 Answers

0
votes

I can reproduce your scenario from my end as well. Tried using Graph Explorer, Console project and ASP.NET MVC (can download the sample from this link) enter image description here

I have read through the attachment_get Microsoft document, however I can't find any API for your case. I presume there is no such function atm.

I recommend you to raise a ticket from your end to the OfficeDev.

PS: I had an unusual access is denied error when I tried to access group in ASP.NET MVC sample although I'm logged in with admin account, and it still shows access request is denied. enter image description here

0
votes

https://docs.microsoft.com/en-us/graph/api/resources/attachment?view=graph-rest-1.0

Events in group calendars do not support attachments.

Last year (an entire year after this question was asked) Microsoft finally clarified in the Graph docs that group events do not support attachments.