0

我的交換服務正常工作。我可以通過Outlook查看所有房間,並可以通過Powershell查看所有房間。 但是,在這個片段中,我不能檢索到任何房間無法從C Exchg 2013中檢索任何房間列表#

 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); 
     } 

列表是空的!

回答

0

有關更多信息,請參閱here。您需要遍歷從GetRoomLists()獲得的集合中的房間列表,然後使用service.GetRooms(myRoomList)遍歷每個房間列表中的會議室。