EWS: save new appointment in shared calendar RRS feed

  • Question

  • I am in the process of changing an application to EX2013. The previous installation used EX2007 and a public folder calendar to keep appointments.

    AFAIK in EX2013 shared mailboxes should be used for common access to mails/appointments necessary fro more than one people, such as the famous "info@..." account.

    In fact I have not only to concentrate emails but also keep appointments in this shared mailbox.

    My problem now is that my VB.NET code saves the appointment always in the calendar of the user which is logged in, not to the shared mailbox.

    AFAIK a "normal"mailbox is associated with a AD user with login-name and password, while the shared mailbox has no user with a password to  log in.

    Dim retFolderID As Microsoft.Exchange.WebServices.Data.FolderId
                ss.Credentials = New System.Net.NetworkCredential(user, passwd)
    'now the pyhsical user should be logged in
    'this is the new code which should lead to the shared calendar
     Dim mb = New Microsoft.Exchange.WebServices.Data.Mailbox("info@domain.local")
                Dim fID = New Microsoft.Exchange.WebServices.Data.FolderId(WellKnownFolderName.Calendar, mb)
    'Is this correct?
                    retFolderID = fID
    'This is the old code used for the publicfolder
                    'retFolderID = Microsoft.Exchange.WebServices.Data.Folder.Bind(ss, fID)
                Catch ex As Microsoft.Exchange.WebServices.Data.ServiceRequestException

    May be my mistake comes later when I bind a service to a new Appointment ...

    Dim zz As New Microsoft.Exchange.WebServices.Data.Appointment(ss)

    With this I don't have a line where the above folder or folderid is used.

    Can anybody giv me some hints ?

    Monday, December 14, 2015 6:37 PM


All replies