Questions tagged [exchangewebservices]

Exchange Web Services (EWS) is an extensibility point for clients that connect to the Exchange server and consume information about user availability, and the manipulation of items that are located in the Exchange data store.

Welcome to the EWS tag on StackOverflow!!! Use this tag to find answers, ask questions, and answer questions about the Exchange Web Services (EWS) and the Autodiscover web services provided by Exchange Server and Exchange Online. To help you create higher quality and more consistent posts, here is some guidance on how to title and flesh out the post body so that the community can more easily answer your questions:

Post Title

The post title is the first thing a reader will see. To give the reader an idea about what the post will contain, we suggest you use the following format:

Exchange Version - Programming Language - Client platform: Information you seek

Here are a couple of example titles:

  • E2013 - Java - Android KitKat: How do I upload more than one contact?
  • EXO - C# - Windows 8.1: Can I use the EWS Managed API with a Windows Store App?

Post Body

The post body should provide as much background information as possible to help the other contributors answer your questions. The following list identifies information you should consider providing when creating your post (of course, do not post sensitive information like account names, passwords, machine names, etc):

  • Exchange Version: Exchange version and service pack. Include build and version numbers if available. You can get the build and version from the XML response.
  • Client API version: Provide the client API version, if applicable.
  • IDE: The development tools you are using if they are applicable to answering your question.
  • Targeted features: Identify which features are involved in your question.
  • Code examples: Provide both the client code, and for debugging purposes, the XML request and response sent and received by the client. You can use applications like Fiddler or NetMon to capture the request/response XML. If you are using the EWS Managed API, you can provide an XML trace, here's how.
  • Scenario description: Describe the scenario that results in you posting a question to this forum. More information is better.

Here are some considerations for describing your scenario:

  • Give a thorough description of what you are trying to do and how you are attempting to do it. Provide the steps you have already attempted.
  • Identify resources you've tried to use (include links)
  • Identify the target platforms
  • Provide a code example that describes the problem (as long as it does not reveal sensitive information.)
  • Give a description of the environment for client and server hardware and software. Firewalls, proxy, trusts, security models, system architecture and other environmental factors can have programmability implications.
  • Provide error codes and exceptions; identify the specific part of the code that threw an exception. Provide stack traces if applicable.
  • Provide log entries and traces as long as they do not reveal sensitive information. Delete sensitive information.
  • Provide performance counter information from the Exchange Server.
  • List the specific questions that you want answered.
  • Don't assume that the reader knows all the background information. The more information that you provide, the better/quicker answer you will receive. It is easy to skip content that is understood; that is much better than leaving out information.

Mark answers

This forum has mechanisms for marking and qualifying answers as useful. When a question has been successfully answered, please mark the answer as useful so that readers can easily scan posts for the answer.

4045 questions
628
votes
6 answers

How can I detect if this dictionary key exists in C#?

I am working with the Exchange Web Services Managed API, with contact data. I have the following code, which is functional, but not ideal: foreach (Contact c in contactList) { string openItemUrl = "https://" + service.Url.Host + "/owa/" +…
Adam Tuttle
  • 19,505
  • 17
  • 80
  • 113
80
votes
1 answer

EWS API - Error when recreating notification subscriptions

When working with pull subscriptions to Office365 calendar folders, I've been getting a lot of ErrorReadEventsFailed messages in the SendNotification request. This error essentially means that the subscription can no longer be found, and the server…
jstruzik
  • 1,440
  • 10
  • 19
40
votes
13 answers

'Autodiscover service couldn't be located' when trying to access Exchange 2010 account with EWS MANAGED API

I am using Auto discover service Url for a specified e-mail address. ExchangeService Service = new ExchangeService(ExchangeVersion.Exchange2010); Service.Credentials = new WebCredentials("username@domainname.com",…
user1891567
  • 681
  • 2
  • 10
  • 15
37
votes
3 answers

Error when I try to read/update the .Body of a Task via EWS Managed API - "You must load or assign this property before you can read its value."

I am using the Exchange Web Services Managed API to work with Tasks (Exchange 2007 SP1). I can create them fine. However, when I try to do updates, it works for all of the fields except for the .Body field. Whenever I try to access (read/update)…
tgolisch
  • 6,549
  • 3
  • 24
  • 42
29
votes
3 answers

Exchange Web Service FolderId for a not well known folder name

I have a folder in an Exchange mailbox that is a child of the root (not Inbox). How do I get the ID of such folder using EWS Managed API? Only examples I find are those relating to WellKnownFolderNames.
marcwenger
  • 439
  • 1
  • 7
  • 19
29
votes
5 answers

EWS body plain text

I use EWS to get exchange emails, but how can i get plain text from email body, without html? Now i use this: EmailMessage item = (EmailMessage)outbox.Items[i]; item.Load(); item.Body.Text
JNM
  • 1,175
  • 4
  • 20
  • 39
28
votes
2 answers

Marking an email message as read using Exchange Web Services 2007

I am subscribed to an email account using Exchange Web Services 2007 and processing attachments as new emails come in. I would like to mark those emails as "read" on the server after I'm done processing them, but I'm finding it's not as simple as…
tmountjr
  • 1,423
  • 2
  • 22
  • 38
28
votes
4 answers

Connection to Office 365 by EWS API

I am using EWS API in my console application to process mailbox items and my connection script looks like ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1); service.UseDefaultCredentials =…
Muflix
  • 6,192
  • 17
  • 77
  • 153
28
votes
3 answers

Exchange Web Service API and 401 unauthorized exception

When I try sending email using the EWS API, I get the following error: (in message.Send();) The request failed. The remote server returned an error: (401) Unauthorized. My code is the following: ExchangeService exchangeService = new…
27
votes
0 answers

Getting error code `ErrorIrresolvableConflict` responses when trying to create events on a calendar using Outlook REST API

In the last few days (starting on Oct 28, 2019), without any code change on our part, we've started seeing a significant amount of requests from our server to create events on a calendar (using this endpoint:…
lior
  • 537
  • 4
  • 13
26
votes
4 answers

How to get email body, receipt, sender and CC info using EWS?

Can anyone tell me how to get an email body, receipt, sender, CC info using Exchange Web Service API? I only know how to get subject. ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010); service.Credentials = new…
Steven Zack
  • 4,984
  • 19
  • 57
  • 88
25
votes
1 answer

Getting started with Exchange Web Services 2010

I've been tasked with writing a SOAP web-service in .Net to be middleware between EWS2010 and an application server that previously used WebDAV to connect to Exchange. (As I understand it, WebDAV is going away with EWS2010, so the application server…
Adam Tuttle
  • 19,505
  • 17
  • 80
  • 113
23
votes
1 answer

Exchange Web Services (EWS) Single Sign-On using TokenCredentials?

I'm working with the EWS Java API 1.2 in an Android application. Logging in with username/password WebCredentials is working fine using something like this: ExchangeService service = new ExchangeService(); ExchangeCredentials credentials = new…
22
votes
1 answer

Error "HTTP/1.1 401 Unauthorized" with basic authentication in android - EWS 2010

I refer to this link to request to the server. The problem is sometime (not always, about 20% - 30%, means sometime I can get successful response), I got the 401 error and server response basic authorization challenge expected, but not found. Here…
ductran
  • 10,043
  • 19
  • 82
  • 165
20
votes
1 answer

EWS: Set action is invalid for property when updating RequiredAttendees of an appointment

I am trying to update an existing appointment but EWS is throwing "Set action is invalid for property.". I reviewed all values set to the appointment object, but I am unable to figure out the actual cause of this error. Here is my code…
Firoz Ansari
  • 2,505
  • 1
  • 23
  • 36
1
2 3
99 100