5

Is it possible to access shared mailbox using graphs?

I would like access shared mailbox mail folders using graphs.

user10189975
  • 53
  • 1
  • 1
  • 3

1 Answers1

12

Simply treat it as any other user:

https://graph.microsoft.com/v1.0/users/sharedaddress@microsoft.com/messages

Make sure you have the right permissions set (Mail.Read.Shared)

Ami Gulzadi
  • 196
  • 1
  • 4
  • 1
    Thank you Ami. I have tried that earlier and it works. I also want to get a list of all shared mailbox using graphs without giving the shared mailbox user id or email address. Any workarounds? – user10189975 Aug 07 '18 at 21:42
  • 2
    No problem. There is no fool proof way of distinguishing shared mailboxes from normal users as of now. I figured you could filter on givenName eq null, since shared mailboxes don't have a givenName unless explicitly assigned one, but the api doesn't allow filtering on null. Depending on your situation you're best off assigning a keyword (like 'shared') as the givenName when creating shared mailboxes, or using the beta ["findroomlists" outlook api endpoint](https://blogs.msdn.microsoft.com/exchangedev/2017/06/30/announcing-new-rest-apis-in-beta-for-rooms-time-zones-and-languages/) – Ami Gulzadi Aug 08 '18 at 05:29