7
POST https://graph.microsoft.com/v1.0/groups/4a3c5f77-463e-XXXXXX-fa8XXXXXX/calendar/events
Accept: application/json
Authorization: Bearer <Token>
Content-Type: application/json; charset=utf-8


{
  "originalStartTimeZone": "UTC",
  "originalEndTimeZone": "UTC",
  "start": {
    "dateTime": "2015-12-03T09:30:00-00:00",
    "timeZone": "UTC"
  },
  "end": {
    "dateTime": "2015-12-03T10:30:00-00:00",
    "timeZone": "UTC"
  },
  "responseStatus": {
    "response": "Accepted",
    "time": "2015-12-01T18:34:00-08:00"
  },
  "reminderMinutesBeforeStart": 15,
  "isReminderOn": true
}

Error:

{
  "error": {
    "code": "ErrorInternalServerError",
    "message": "The SMTP address has no mailbox associated with it.",
    "innerError": {
      "request-id": "f62423b0-0ade-494d-8c8c-1b56db60b524",
      "date": "2015-12-02T10:39:44"
    }
  }
}

I have tried with both post url mentioned below,

POST /groups/<id>/events
POST /groups/<id>/calendar/events

I have tried with different group types which include security enabled, mail-enabled and Unified Groups but I am seeing the same error message, any help would be appreciated.

Marc LaFleur
  • 31,987
  • 4
  • 37
  • 63

2 Answers2

4

Group calendar access is not supported in app-only authorization flow.

We are working on returning a better error for this case.

Marek Rycharski
  • 1,614
  • 11
  • 10
  • 1
    Oh, that's a shame - rather scuppers my project unfortunately. :-( Is it on the roadmap for being supported in the future, or will daemon processes never be able to use client credentials to manipulate group calendars? – Jon Knight Dec 09 '15 at 00:03
  • 1
    Yes, it's on the roadmap, but will not be available in the nearest future. – Marek Rycharski Dec 09 '15 at 18:04
  • @MarekRycharski Could you please tell or reference me to a proper way to list events or get calendar of a group – Onur Kucukkece Dec 22 '15 at 19:30
  • 1
    GET /groups//events Please see https://graph.microsoft.io/docs/api-reference/v1.0/api/group_list_events for reference. – Marek Rycharski Dec 24 '15 at 16:47
  • I added a [suggestion to the Office 365 Groups improvements site](http://office365.uservoice.com/forums/286611-office-365-groups/suggestions/11591322-allow-daemons-using-graph-api-client-credential-fl) to ask if Graph could be used by daemons to play with Office 365 Groups. If the lack of OAuth2 client credentials flow access to O365 Groups is something you'd like to see, nip over there and give it some votes! :-) – Jon Knight Jan 26 '16 at 17:19
3

I believe that you will get this error for security groups or mail-enabled security groups. This will ONLY work for Unified (O365) groups. Only those types of group have content associated with them. To ensure you are creating a unified group correctly, here's the request and payload of a typical request:

POST https://graph.microsoft.com/v1.0/groups

{
  "description":"Group 5bff4 is the best ever",
  "displayName":"Unified group 5bff4",
  "groupTypes":["Unified"],
  "mailEnabled":true,
  "mailNickname":"Group5bff4",
  "securityEnabled":false
}

Then your request to ../groups//events should work. NOTE: creation of the underlying group mailbox may take a few seconds (something we are working to improve), so creation of the event directly after group creation may fail.

Hope this helps,

Dan Kershaw - MSFT
  • 5,833
  • 1
  • 14
  • 23
  • I've created a Unified group using the POST API shown, I can get the group details (including by the ID) via the Graph API but I still get the error that the OP had, "The SMTP address has no mailbox associated with it." Interestingly, using the Office365 web front end I can join the group (its public on our test Azure AD instance) and create calendar entries. When I do this, the calendar entries appear, but I also sometimes get an error saying that the calendar entry could not be created despite the fact that it has been (and others can see the entry). – Jon Knight Dec 07 '15 at 15:53