My exchange services works. I can see all rooms by Outlook and Can see all rooms through Powershell. But with this snippet I cannot retrieve any room
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1);
service.UseDefaultCredentials = true;
service.Url = new Uri("https://my server/ews/exchange.asmx");
service.AutodiscoverUrl("[email protected]", RedirectionCallback);
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);
}
The list is empty!
See here for more info. You need to iterate through the room lists within the collection you got from GetRoomLists(), and then iterate through the conference rooms in each room list using service.GetRooms(myRoomList).