Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6387943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:13:02+00:00 2026-05-25T03:13:02+00:00

We have a problem deleting Appointments from Exchange using EWS. We try to delete

  • 0

We have a problem deleting Appointments from Exchange using EWS.

We try to delete Appointments from Exchange like this

ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1);
service.Credentials = CurrentUser; // NetworkCredential
service.Url = new Uri(WebserviceAddress);
service.UseDefaultCredentials = false;

var appointment = Appointment.Bind(service, id);
deletedAppointment.Delete(DeleteMode.MoveToDeletedItems, SendCancellationsMode.SendToAllAndSaveCopy);

We get an exception with the message “Object cannot be deleted.”

Microsoft.Exchange.WebServices.Data.ServiceResponseException was
caught Message=Object cannot be deleted.
Source=Microsoft.Exchange.WebServices StackTrace:
at
Microsoft.Exchange.WebServices.Data.ServiceResponse.InternalThrowIfNecessary()
at
Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest1.Execute()
at
Microsoft.Exchange.WebServices.Data.ExchangeService.InternalDeleteItems(IEnumerable
1
itemIds, DeleteMode deleteMode, Nullable1 sendCancellationsMode,
Nullable
1 affectedTaskOccurrences, ServiceErrorHandling
errorHandling)
at
Microsoft.Exchange.WebServices.Data.ExchangeService.DeleteItem(ItemId
itemId, DeleteMode deleteMode, Nullable1 sendCancellationsMode,
Nullable
1 affectedTaskOccurrences)
at
Microsoft.Exchange.WebServices.Data.Item.InternalDelete(DeleteMode
deleteMode, Nullable1 sendCancellationsMode, Nullable1
affectedTaskOccurrences)
at
Microsoft.Exchange.WebServices.Data.Appointment.Delete(DeleteMode
deleteMode, SendCancellationsMode sendCancellationsMode)
at
OurNameSpace.ExchangeCalendar.ViewCalendars.ExchangeMethods.DeleteMeeting(ItemId
id) InnerException:

If we instead try to use cancel the meeting

deletedAppointment.CancelMeeting();

we get an exception with the message “User must be an organizer for CancelCalendarItem action.” This makes me really confused, because when I inspect the deletedAppointment object my email address is set as the organizer.

We create our meetings like this

Appointment appointment = new Appointment(service);
appointment.Subject = subject;
appointment.Body = body;
appointment.Start = start;
appointment.End = end;
appointment.Location = location;
appointment.RequiredAttendees.Add(location);
appointment.RequiredAttendees.Add(requiredAttendees);
try
{
    appointment.Save(SendInvitationsMode.SendOnlyToAll);
}
catch ...

location contains the name of a conference room mailbox.
if we pause a while (until the Appointment appears in Outlook) and call Delete on the same Appointment instance we used when we created the meeting the appointment is deleted successfully.

The code runs in a custom SharePoint 2010 WebPart. Not that I could think that it would make any difference, but who knows?

Why can’t I delete the appointment?
How can I investigate further?
As far as I can see the code is mostly copy’n paste of an MSDN example.

Edit
When I copy a minimal example of the code to a Winform application the meeting is deleted correctly. Could there be any critical difference when running in the Sharepoint context?

Edit 2
CurrentUser is a user supplied username and password. The Exchange server is not on the same domain as SharePoint server.

Edit 3
If I open the appointment in outlook (with the same login as in the CurrentUser variable) I can cancel the appointment.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:13:02+00:00Added an answer on May 25, 2026 at 3:13 am

    At last we found out that the issue was outside the simplified example above.
    The issue was that we used a “view only” account to fetch all the appointments in the calendar. We then tried to use that appointment id when we tried to delete the appointment using the CurrentUser credentials, but that ID was not valid in the context of the new user.
    When we changed to retrieve the calendar items with CurrentUser instead of our view only account everything started to work.

    Thanks anyway for trying to help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have problem creating new instance of excel 2007 using VBA (from Access 2002).
My problem is deleting a node from linked list. I have two structs :
I have a problem with my code in php. I would like to delete
I have a problem with deleting my objects. I wrote a delete method which
I have a problem with my delete parameter. I am using a GridView and
I have tried numerous attempts to fix this problem or bug, firstly by deleting
I am trying to delete macros from C headers but I have problem with
I have problem with deleting rows from table. I have a class for cell
I have a problem with deleting a record from my SQLite3 database: conn =
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.