Questions tagged [ews-managed-api]

Exchange Web Services (EWS) API that can be used to access Exchange resources.

Microsoft Exchange Server 2007 introduces Exchange Web Services (EWS), a API that can be used to access Exchange resources. EWS is a SOAP-based XML Web service that can be accessed remotely from any operating system and any language that can send requests over HTTPS.

Creating a new folder in the Inbox

Folder folder = new Folder(service); folder.DisplayName = "My new folder"; folder.Save(WellKnownFolderName.Inbox);

Creating and saving a draft e-mail message

EmailMessage message = new EmailMessage(service); message.Subject = "Hello from the EWS Managed API"; message.Body = "Now that's easy!"; message.ToRecipients.Add("someone@fabrikam.com"); message.Save();

370 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
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
30
votes
8 answers

Save mail to msg file using EWS API

I'm using Exchange Web Services Managed API 1.1 to connect to Exchange server 2010 and then find out new emails received. Now I want to save a copy of the .msg file to a folder on the disk. I do not want to use any paid third party to integrate.…
Bhanu Prakash
  • 301
  • 1
  • 3
  • 3
24
votes
2 answers

Extract Exchange 2007 Public Calendar Appointments using Exchange Web Services API

We have a public calendar for our company set up in an Exchange 2007 Public Folder. I am able to retrieve my personal calendar appointments for the current day using the code below. I have searched high and low online and I cannot find one example…
NinjaBomb
  • 785
  • 2
  • 13
  • 29
19
votes
1 answer

Mapping Office365 REST Calendar IDs to EWS CalendarItem IDs

Using Exchange push notifications I've been creating a service that syncs over calendar data from Office365 users. I've been using a combination of the Office365 Calendar REST API (to get and manage calendars) and the EWS API (to subscribe to…
jstruzik
  • 1,440
  • 10
  • 19
17
votes
2 answers

How do i find out if an appointment is private

I use Exchange Server Managed API. How do I find out if an appointment is private? There doesn't seem to be a method or property in the "Appointment" class.
Luke
  • 5,771
  • 12
  • 55
  • 77
16
votes
2 answers

EWS Managed API find items with ItemID

I am trying to find items from deleted items folder given the items unique id ItemId id = new ItemId("zTK6edxaI9sb6AAAQKqWHAAA"); SearchFilter.IsEqualTo filter = new SearchFilter.IsEqualTo(ItemSchema.Id, id); ItemView view = new…
nilobarp
  • 3,806
  • 2
  • 29
  • 37
13
votes
3 answers

Using EWS Managed API to create appointments for other users?

In EWS Managed API is it easy to create an appointment for a specific user: ExchangeService service = new ExchangeService(); service.Credentials = new NetworkCredentials ( "administrator", "password", "domain"…
Kyle
  • 17,317
  • 32
  • 140
  • 246
12
votes
1 answer

Exchange FindItem responding with different set of properties for one item id and for multiple item ids

When I loading properties of multiple exchange items by ExchangeService.LoadPropertiesForItems method, Exchange skip some properties of items attachments in response:
Yuriy Rozhovetskiy
  • 22,270
  • 4
  • 37
  • 68
11
votes
2 answers

EWS Managed API: how to set From of email?

I'm using EWS Managed API to sending email. Account "account@domain.com" have permissions "Send as" to use "sender@domain.com" mailbox to send messages (from Outlook, it's work fine). But I try from code - it's not work, in mail i'm read in the…
ABarto
  • 235
  • 2
  • 3
  • 12
11
votes
3 answers

Exchange Web Services Managed API: Accessing other users items

Is it possibly to access the folders and items of other Exchange accounts other than the one of the logged in user? Can I do this via Exchange Web Services Managed API?
Luke
  • 5,771
  • 12
  • 55
  • 77
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
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
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…
1
2 3
24 25