-1

I would like to create a subscription for incoming mails on a shared mailbox with Microsoft graph.

Background:

  • I have an app created with delegated user rights:

    Read all webhook subscriptions (preview)

    Read and write user mailbox settings

    Read and write user and shared mail

  • I have created a shared mail box
  • I have added a user to that shared mailbox.
  • I have added the shared mailbox to the users folders so I see users mailbox and the shared mailbox in the WEB GUI

I have created a c# program to receive auth token, created subscriptions and listed messages from a mailbox

What works:

  • Receiving auth token

  • List messages of users mail box

  • List messages of shared mailbox
  • Create subscription on users mail box

It does not work if I try to create a subscription for incoming mails in the shared mail box.

My resource string during creation of the subscription is:

Resource = users/xx@xxx.onmicrosoft.com/mailFolders('Inbox')/messages

As said works well with the users mail address but fails using the shared mail box address:

{
  "error": {
    "code": "ExtensionError",
    "message": "Operation: Create; Exception: [Status Code: Forbidden; Reason: Forbidden]",
    "innerError": {
      "request-id": "xxxxx-8515-4048-8c05-f3eb91a1f69a",
      "date": "2018-12-13T15:17:09"
    }
  }
}Subscription failed because:Forbidden

Did I use the wrong resource string here or did I miss an app right here?

rogerdeuce
  • 1,471
  • 6
  • 31
  • 48
AWC
  • 9
  • 1
  • according to https://answers.microsoft.com/en-us/msoffice/forum/all/new-email-notification-for-shared-mailboxes/356cca22-6b23-440c-84a4-3a7b1c4021ad this will never work This is 'expected behavior' for shared mailboxes- you'd need to add it as an account, not a shared mailbox, to get notifications. You could use macros to watch the inbox and alert you when a new message arrived. – AWC Dec 19 '18 at 15:19

1 Answers1

0

according to [Microsoft comunity][1]https://answers.microsoft.com/en-us/msoffice/forum/all/new-email-notification-for-shared-mailboxes/356cca22-6b23-440c-84a4-3a7b1c4021ad

this will never work This is 'expected behavior' for shared mailboxes- you'd need to add it as an account, not a shared mailbox, to get notifications. You could use macros to watch the inbox and alert you when a new message arrived.

AWC
  • 9
  • 1