What is the differences between Office 365 APIs and EWS - exchangewebservices

What are the differences between Office 365 APIs and EWS (Exchange Web Services) ?
When do I use one or another?

Office365 API only works for Office365, while EWS works for any Exchange server from Exchange2007 up (including Office365). Other than that:
EWS is SOAP, Office365 API REST
EWS has a very nice/easy to use managed wrapper for .NET/Java
EWS has way more features - similar to using an Exchange client for Office365 compared to the webinterface. Things like Tasks are not in the Office365 API afaik.

Related

Use token from Outlook web add-in for EWS write operations

Is it possible to use any tokens from an Outlook add-in for use with authenticating EWS Managed API operations that create or update items?
Apparently the token returned from mailbox.getCallbackTokenAsync can only be used in read operations. I can indeed verify that is a problem because attempts to send emails or call UserConfiguration.Update result in an error:
The requested web method is unavailable to this caller or application.
I have been testing these methods from an ASP.NET Web API App Service in Azure, called from JavaScript in the Outlook add-in.
Apparently mailbox.getUserIdentityTokenAsync can be used to validate a user, but it is not clear if that can be used in conjunction with OAuthCredentials for ExchangeService.Credentials.
Are there any options here? I cannot ask the user for their username and password to authenticate with Exchange. I am certainly willing to use Graph or the Mail API, but AFAIK there are no ways to update user configuration items with those APIs.
You're looking for makeEwsRequestAsync(). Both CreateItem and UpdateItem operations are supported makeEwsRequestAsync.
You can find the full list of supported EWS operations in the documentation under EWS operations that add-ins support.
There is also support for calling into Microsoft Graph via the add-in but as you noted, Microsoft Graph supports a very limited number mailbox configuration options.

How to search items across folders in office 365 using EWS Java API

I'm trying to search items across folders in office 365 using EWS Java API.
I'm using EWS Java API 1.3 version (https://github.com/OfficeDev/ews-java-api)
I have seen the following link and tried like that in Java but still this one also not working
Exchange Web Services (EWS) FindItems within All Folders
Regards
Ramesh
In 2013 and Office365 the best thing to use to search a Mailbox is eDiscovery which you can use from EWS http://msdn.microsoft.com/en-us/library/office/jj190897(v=exchg.150).aspx . There is nothing in the Java API to use the eDiscovery SOAP operations so you would need to either build those yourself or use raw SOAP or generate some proxyclass to use it.
Cheers
Glen

How to create tenant programmatically by Office 365 API client libraries

I was developing a windows store app integrate with Office 365 API client libraries, But I can't find a interface in office365 api can be used to create a new tenant? Is there any method that can create tenant programmatically.
The Office 365 APIs do not allow you to provision new tenants at this time. If you'd like to see this feature please let the team know at the Office/SharePoint developer UserVoice.

Which one is better EWS API or EWS managed API?

I am developing email client for exchange server ....... I came across EWS and EWS Managed API. Please help me understand which one I should go for ?
If you are:
Using .Net and the functionality is implemented in the EWS Managed API....use the EWS Managed API.
Using .Net and the functionality is not implemented in the EWS Managed API....use the EWS Managed API to discover the EWS endpoint, and then code directly against EWS or use a proxy object model generator.
Using Java (not Android), use the EWS Java API. Note that this isn't actively updated, but you have access to the source.
For everything else, look to see if there are client implementations available. For example, you could evaluate IndependentSoft's client implementation (this is not an endorsement, this is just me giving an option). If not, you should implement Autodiscover and the EWS client.

Exchange EWS: class "DistinguishedFolderIdType" not defined

I'm using Exchange web services, trying to create a calendar entry in another user's mailbox. My account in EWS has rights to do this, and I can successfully use Impersonation to create thes appointment in any mailbox.
However, some examples I've seen of doing this, use an instance of DistinguishedFolderIdType, not impersonation, to set the mailbox for the appointment.
Problem is, this class simply isn't appearing in my installation of the EWS SDK for Visual Studio. It's v1.1, obtained here, but can't be found in Object Explorer. What am I missing?
The type DistinguishedFolderIdType is not part of the EWS Managed API.
If you do not use the EWS Managed API but generate your own SOAP client proxy manually from Visual Studio by adding a reference to the EWS .asmx service, the generated proxy will contain DistinguishedFolderIdType.
However, depending on what you are trying to accomplish, you should be able to do it using the classes provided på EWS Managed API 1.1 and you won't need DistinguishedFolderIdType.