I am creating a meeting in the rooms calender by a service account impersonating the rooms calender. Now there are 2 rooms, i create appointment in first rooms calender and add second room as a resource. I want appointmentid of firstrooms calender appointment as well as second rooms calender appointment. I am using invitation mode as SendInvitationsMode.SendToAllAndSaveCopy
To save the appointment
Appointment.Save(new FolderId(WellKnownFolderName.Calendar, new Mailbox(PrimaryRoom.ExternalRoomID.Trim())), SendInvitationsMode.SendToAllAndSaveCopy);
To get the appointmentId for primary room:
Appointment.Bind()
Now, is there a way that i can also get the second room appointment id. I am searching it using CalendarView however sometimes it returns it and sometime it doesnot. My understanding is that exchange takes some time to create the appointment in resource calender and does not return appointmentid immediately after querying it. If i use thread.sleep for some time, i get the appointment id. I dont want to use thread.sleep.
Can you please suggest a solution to this.
Thanks and Regards
Rohit