Hi,
I'm trying to retrieve list of rooms using EWS Managed API. Before I have tried the following code I make sure our Administrator put all the rooms in a list following link https://technet.microsoft.com/en-us/library/ee633471%28v=exchg.141%29.aspx.
Here is the simple code I have used :
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Exchange.WebServices.Data; using System.Net; using System.Security; namespace ExchangeConsole1 { class Program { static void Main(string[] args) { ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2013_SP1); service.Credentials = new NetworkCredential("username", "Password1", "domain"); service.Url = new Uri("https://email.xxxx.com/ews/exchange.asmx"); EmailMessage email = new EmailMessage(service); EmailAddressCollection listOfRoomList = service.GetRoomLists(); // Display the individual rooms. foreach (EmailAddress address in listOfRoomList) { Console.WriteLine("Email Address: {0}", address.Address); } } } }
service.GetRoomLists() results "Enumeration yielded no results". Could anybody help me please ?
Thanks
Sandipan