title: How to get rights to access another mailbox calendar using EWS JAVA API
body: <p>I am able to get the meeting rooms available in my Organisation using the below code, I need to get the appointment of the particular room, so i have used the below code for it.`</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
      // TODO Auto-generated method stub
      static ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
      ExchangeCredentials credentials = new WebCredentials("xxx@yy.com", "zzzz");
      service.setCredentials(credentials);
      try {
          System.out.println("Check");
          service.autodiscoverUrl("xxx@yy.com",new RedirectionUrlCallback());
  
  
  
      } catch (Exception e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
  
      NameResolutionCollection nameResolutions = service.resolveName("MeetingRoom1",ResolveNameSearchLocation.DirectoryOnly, true);
      System.out.println("nameResolutions==="+nameResolutions.getCount());
  
      for(NameResolution nameResolution : nameResolutions)
      {
          System.out.println("NAME==="+nameResolution.getContact().getDisplayName());
  
  
      }
      Date startDate = new Date();
      Calendar cal = Calendar.getInstance();
      cal.setTime(startDate);
      cal.add(Calendar.DATE, 30); // add 10 days
  
      Date endDate = cal.getTime();
         Mailbox meetingMailbox = new Mailbox("meetingroom-1@yy.com");
         FolderId CalendarId = new FolderId(WellKnownFolderName.Calendar, meetingMailbox);
         CalendarView cView = new CalendarView(startDate, endDate);
         FindItemsResults&lt;Appointment&gt; appointments = service.findAppointments(CalendarId, cView);
         for (Appointment a : appointments)
         {
             System.out.println("Subject: " + a.getSubject().toString() + " ");
             System.out.println("Start: " + a.getStart().toString() + " ");
             System.out.println("End: " + a.getEnd().toString());
             System.out.println();
         }
  }`
  </code></pre>
  
  <p>If i execute this code, i am able to get the list of all meeting room available in my Organisation with name MeetingRoom1, then i am trying to access the particular meetingroom-1@yy.com to get the appointments for that room ,but throwing some exception like below.</p>
  
  <pre><code>Exception in thread "main" microsoft.exchange.webservices.data.ServiceResponseException: The specified folder could not be found in the store.
  at microsoft.exchange.webservices.data.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:262)
  at microsoft.exchange.webservices.data.ServiceResponse.throwIfNecessary(ServiceResponse.java:251)
  at microsoft.exchange.webservices.data.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:146)
  at microsoft.exchange.webservices.data.ExchangeService.findItems(ExchangeService.java:807)
  at microsoft.exchange.webservices.data.ExchangeService.findAppointments(ExchangeService.java:1089)
  at com.hcl.GetRoomClass.main(GetRoomClass.java:58)
  </code></pre>
  
  <p>I guess it may be due to that i dont have access rights to access the calendar of the meeting room. How to proceed further to get the appointment. please help me .I need it in EWS-JAVA API.</p>
  
  <p>Thanks in advance.</p>