Currently, Microsoft Graph cannot distinguish whether a mailbox is a user or a room. As a workaround, we can get the numbers using GetRoomLists and GetRooms EWS. Here is an example of getting lists of rooms and rooms for your reference:
// Return all the room lists in the organization. // This method call results in a GetRoomLists call to EWS. EmailAddressCollection myRoomLists = service.GetRoomLists(); // Display the room lists. foreach (EmailAddress address in myRoomLists) { Console.WriteLine("Email Address: {0} Mailbox Type: {1}", address.Address, address.MailboxType); } private static void GetRooms(ExchangeService service) { // Return all the room lists in the organization EmailAddressCollection myRoomLists = service.GetRoomLists(); // Retrieve the room list that matches your criteria EmailAddress myAddress = new EmailAddress(" building31@contoso.com "); foreach (EmailAddress address in myRoomLists) { if (address == myAddress) { Console.WriteLine("Found {0} in room list", myAddress); } } // Expand the selected collection to get a list of rooms. System.Collections.ObjectModel.Collection<EmailAddress> myRoomAddresses = service.GetRooms(myAddress); // Display the individual rooms. foreach (EmailAddress address in myRoomAddresses) { Console.WriteLine("Email Address: {0}", address.Address); } }
And if you want Microsoft Graph to differ in the type of mailbox, you can send feedback from the link here .
source share