How to differentiate between user mailbox and shared mailbox from Microsoft Graph API explorer. I want to build app which should work with only shared mailboxes. Use of powershell is not possible due to limitation of basic authentication and we are not yet ready for modern authentication.
Asked
Active
Viewed 2,335 times
2 Answers
4
There is finally a property available in Graph Beta for the MailboxSettings
object to check this:
Properties
Property | Type | Description |
---|---|---|
userPurpose | userPurpose | The purpose of the mailbox. Used to differentiate a mailbox for a single user from a shared mailbox and equipment mailbox in Exchange Online. Read only. |

Mr Quant
- 104
- 9
-
This helped. But this being user level property, we have to query each user separately. If we do this, we get throttled quickly. Thanks again for clear input. – Manojkumar May 16 '22 at 13:08
-
It is not more beta. Great! – elano7 Jun 20 '23 at 13:57
0
There seems not to be a way to differentiate shared mailboxes and normal user mailboxes with Microsoft Graph API explorer.
You could assign a keyword (like 'shared') as the givenName when creating shared mailboxes, or using the beta "findroomlists" outlook api endpoint.
See a similar post here.

Allen Wu
- 15,529
- 1
- 9
- 20
-
Thanks a lot Allen, I will try your suggestion. Along with shared mailbox, I wanted to filter out room and equipment mailboxes, but even for these mailboxes, "isResourceAccount" field is set to null. is there any way to get license usage from graph api? if yes, I can use it to filter out shared and resource mailboxes. – Manojkumar Mar 13 '20 at 13:54
-
1@Manojkumar Sorry for the delay. I just came back to office. You can use `GET https://graph.microsoft.com/v1.0/users?$select=displayName,givenName,assignedLicenses` to filter the assignedLicenses of the user. – Allen Wu Mar 18 '20 at 08:49
-
@Manojkumarm If my answer is helpful for you, you can accept it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in.). This can be beneficial to other community members. Thank you. – Allen Wu Mar 23 '20 at 09:18
-
1To add to the comment above, a mailbox created as a shared mailbox will have an empty `assignedLicenses` list, but a user mailbox converted to a shared mailbox will have `assignedLicenses` populated with the same as before the conversion, so it's a good hint but not definitive – Richard Hunt Feb 26 '21 at 17:02