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
10
votes
6 answers

Creating Tasks for other users using Exchange Web Services (EWS) Managed API

As an "EWS Managed API Newbie", I'm having some problems finding examples and documentation about creating and managing Tasks. I've managed to create a task for myself without a problem. However, I really need to be able to do the following - if…
Chris Roberts
  • 18,622
  • 12
  • 60
  • 67
10
votes
1 answer

EWS call using Managed API 2.2 never returns

I'm using the EWS Managed API v2.2 to make EWS calls. Recently at one of my customers, we have a weird situation where service calls, any service call, never receives a response. We are setting an explicit timeout, surrounding service calls with…
Simon
  • 14,407
  • 8
  • 46
  • 61
10
votes
3 answers

Exchange Web Services: Finding emails sent to a recipient

I'm using Exchange Web Services to connect to a mailbox and look for messages matching certain criteria, using FindItems with a SearchFilter. I can get emails in a mailbox filtering on 'from' email address like this: var service = new…
mattk
  • 1,335
  • 1
  • 14
  • 19
10
votes
3 answers

Getting Exchange Appointments by ICalUid?

So I'm creating Exchange (2007) Appointments with a given ICalUid: var app = new Appointment(svc); app.ICalUid = id; app.Subject = "Test Appointment"; app.Recurrence = new Recurrence.DailyPattern(DateTime.Now,…
Michael Stum
  • 177,530
  • 117
  • 400
  • 535
9
votes
1 answer

Dealing with EWS throttling policies

What is an effective way of dealing with EWS throttling policies? I'm attempting to read every email in my mailbox as well as download all attachments. The issue I'm encountering is that Exchange will often return an exception saying The server…
gcso
  • 2,315
  • 3
  • 28
  • 50
9
votes
2 answers

How to force garbage collection of object you can't dereference?

We are using EWS Managed API which polls MS Exchange for new mail messages after a given interval. With each invocation of the polling call (PullSubscription.GetEvents()) - Microsofts API is failing to properly dispose the NetworkStream and causes…
SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
9
votes
5 answers

Download attachments using Exchange Web Services Java API?

I am writing a Java application to download emails using Exchange Web Services. I am using Microsoft's ewsjava API for doing this. I am able to fetch email headers. But, I am not able to download email attachments using this API. Below is the code…
NareshPS
  • 103
  • 1
  • 1
  • 4
9
votes
1 answer

EWS: NetworkCredential not compatible with ExchangeCredentials in F#

I like to use the Microsoft.Exchange.WebService API: C# works fine ExchangeService service = new ExchangeService(userData.Version); service.Credentials = new NetworkCredential(userData.EmailAddress, userData.Password); F# gives the error: The type…
KCT
  • 287
  • 1
  • 10
9
votes
1 answer

Can we connect to Exchange 2016 using EWS Managed API?

I am using EWS Managed API 2.2 and it does not show the Exchange version 2016 in its enumeration. I can see the versions upto Exchange 2013. So how can I connect to Exchange Server 2016? Is the API, yet to be updated from Microsoft or do I need to…
9
votes
4 answers

Office 365 Rest API - Daemon week authentication

I am trying to build a Ruby Daemon service to access the Office 365 rest API. It was recently made possible to do this via the OAuth 'client_credentials' flow, as detailed in this blog post:…
Nick Maher
  • 189
  • 2
  • 8
9
votes
2 answers

Exchange EWS Get calendar for room

I'm trying to get all the meetings for a specific room, perhaps I'm going down the wrong road but so far the most promising results are produced when I impersonate the room and then get a calendar view - the problem is that for each calendar entry…
Isometric
  • 567
  • 7
  • 19
9
votes
3 answers

Can't access public folders root

I've recently coded a .NET Console app using C#. It's purpose was to read the emails within a specific folder, parse them for specific values and save them to a database. Our email system, at the time I originally coded this, was Exchange 2003.…
9
votes
3 answers

EWS - Access All Shared Calendars

I've got the following code: private void ListCalendarFolders(ref List items, int offset) { var pageSize = 100; var view = new FolderView(pageSize, offset, OffsetBasePoint.Beginning); view.PropertySet =…
synic
  • 26,359
  • 20
  • 111
  • 149
9
votes
3 answers

Find all unread emails using Exchange Web Service 2010 then mark as read?

I'm using Exchang Web Services 2010 to try and read all unread emails from a mailbox, then mark them as read. I'm basing off this example: http://msdn.microsoft.com/en-us/library/exchange/aa563373(v=exchg.140).aspx And have come up with this to find…
Petey B
  • 11,439
  • 25
  • 81
  • 101
9
votes
1 answer

java.security.cert.CertificateExpiredException: NotAfter

I am using EWSJavaAPI 1.1.5 to connect to Exchange Server 2010. Everything was working fine until today while trying to connect to the server, I am getting the following exception: microsoft.exchange.webservices.data.ServiceRequestException: The…
Mahmoud Saleh
  • 33,303
  • 119
  • 337
  • 498