Quantcast
Channel: Exchange Server Development forum
Viewing all articles
Browse latest Browse all 7132

getroomlists is reuturning empty collection

$
0
0

Hi,

i am running excahnge webservice to get the roomlists, but its coming out to be empty. can anyone suggest what's the reason.

we have added the rooms through office 365 after following this link 

http://community.office365.com/en-us/f/158/t/158327.aspx

using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Exchange.WebServices.Data;

namespace ConsoleApplication1
{
    
    class Program
    {
        private static ExchangeService service;
        private static ArrayList RoomList = new ArrayList();
        static void Main(string[] args)
        {
            
            service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);            
            service.Credentials = new WebCredentials(user, password);
            service.TraceEnabled = true;
            service.TraceFlags = TraceFlags.All;                       
             service.Url = new Uri("https://outlook.office365.com/EWS/Exchange.asmx");
             EmailAddressCollection myRoomLists = service.GetRoomLists();
             Console.Write(myRoomLists.Count);
             foreach (EmailAddress address in myRoomLists)
             {
                 Console.Write(address.Address);
                 RoomList.Add(address);
             }
}
Thanks


Viewing all articles
Browse latest Browse all 7132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>