Forum Discussion

Terry Hagan's avatar
Terry Hagan
Iron Contributor
Oct 10, 2016

Using Microsoft Graph to access Office 365 Group Calendar Events

I recently used the Graph API to access the calendar and events from a public Office 365 Group. However, it has stopped working and I have now tried numerous ways to get it working again to no avail, feels like it was just a dream....

The error I get back is:

 

{
  "error": {
    "code": "ErrorNonExistentMailbox",
    "message": "No mailbox was found that includes the external directory object ID that was specified.",
    "innerError": {
      "request-id": "1234567-de44-43d6-8c9d-5fcc10196590",
      "date": "2016-10-01T11:21:10"
    }
  }
} | 

The application has the correct rights to the Microsoft Graph i.e. Groups.Read.All I get a token back from the ADAL authentication, use it as the Bearer. 

 

My URL is 

 

https://graph.microsoft.com/v1.0/groups/<my group id here>/events

 

This returns the response given above, if I remove the events part of the URL I successfully get the group information back.

 

5 Replies

  • Don DeCarlo's avatar
    Don DeCarlo
    Brass Contributor
    https://graph.microsoft.com/beta/groups//41525360-8eca-49ce-bcee-b205cd0aa747/calendar/events
    • Terry Hagan's avatar
      Terry Hagan
      Iron Contributor

      https://graph.microsoft.io/en-us/docs/api-reference/v1.0/api/group_list_events

       

      List events

       

      Retrieve a list of https://graph.microsoft.io/en-us/docs/api-reference/v1.0/resources/event.htm objects.

      Prerequisites

      One of the following scopes is required to execute this API: Group.Read.All or Group.ReadWrite.All

      HTTP request

      GET /groups/{id}/events
      GET /groups/{id}/calendar/events

       

      Tried both, still didn't work, this is not beta functionality. 

  • Hi Terry,

    Can you please help me if you have found a solution for this already. Groups are working fine but I get 'ErrorNonExistentMailbox' error when I try to get events using below code,

     

    let url = `https://graph.microsoft.com/v1.0/groups/${groupid}/events`;
    jQuery.ajax({
    url: url,
    type: 'GET',
    headers: {
    'Authorization': 'Bearer ' + token
    },
    success: function(data) {
    console.log(data);
    },
    error: function(err) {
    console.log(err);
    }
    });

  • Don DeCarlo's avatar
    Don DeCarlo
    Brass Contributor

    Is it possible the mailbox is hidden from the Global address list?

     

    "EWS queries will fail if the mailbox is hidden from the Global Address List"  Not sure in Graph but might be fertile ground to explore.

Resources