Unable to subscribe shared mailbox to a messages change

Yechiel Hadad 6 Reputation points
2022-05-12T12:12:28.673+00:00

Hi,
I'm trying to POST a subscription for a shared mailbox to "messages(inbox)" notifications.
I'm using an access token of a user mailbox that has full access permission on it.
Unfortunately, I'm getting the next error:
"Operation: Create; Exception: [Status Code: Forbidden; Reason: Access is denied. Check credentials and try again.]"

Please let me know if I've missed out anything.

Best,
Yechiel

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,882 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Sheena-MSFT 1,721 Reputation points
    2022-05-12T12:36:32.56+00:00

    Hi @Yechiel Hadad ,

    According to this documentation, to subscribe notifications for messages in a shared mailbox use the corresponding application permission scope.

    201444-appl.png

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have further questions about this answer, please click "Comment".

    0 comments No comments

  2. Yechiel Hadad 6 Reputation points
    2022-05-15T04:36:36.367+00:00

    Hi @Sheena-MSFT ,
    Thank you for your response.
    I'm asking about a shared mailbox, not a shared folder.
    In the meantime, I saw something strength when I opened the JWT of two users that gave our app permission through the OAuth2 process.

    The first one has the next scopes:
    email Mail.Read Mail.Read.Shared Mail.ReadWrite Mail.ReadWrite.Shared Mail.Send Mail.Send.Shared openid profile User.Read

    The second one the next scopes:
    Mail.Read Mail.ReadWrite Mail.Send openid profile email

    The first one successfully subscribed for messages webhook of a shared mailbox that it has full access permission.
    The second one manages a shared mailbox as well, but the subscription fails as mentioned above.

    How do two users that passed the same OAuth2 process have different scopes?

    0 comments No comments