Is there a way we can archive calendar items in Exchange Online? - exchange-server

My question is specific to Exchange Online not Exchange server. I am not able to find any document online stating if Contacts & Calendars can be moved to In-Place Archive mailbox on Exchange Online.
It would be great if you can help me with the steps, if this is possible.
Also, is there a way to access them through Office365 APIs.
Additionally, it would be great to know if this can be done in Hybrid setups, where the primary mailbox is on-premise and archive mailbox is on Exchange Online.

My question is specific to Exchange Online not Exchange server. I am not able to find any document online stating if Contacts & Calendars can be moved to In-Place Archive mailbox
From a Technical point of view you can move any item you like into an In-Place archive, the Archive policies and the Managed Folder Agent however won't move them for reason that Contact are ageless and Calendar appointment if they are recurring shouldn't need archiving. EWS has an ArchiveItem operation https://msdn.microsoft.com/en-us/library/office/jj219964(v=exchg.150).aspx which make the move between store pretty easy. But you should be able to do the same thing with a Move in the REST api.
AFAIK None of the API methods apart from MAPI will work in Hybrid you'll need to rely on a export/import with the other API's

Related

Ability to set users free/busy in MS Exchange Server

We are trying to integrate our app with MS Exchange. One of possible features of that integration is to let other apps know if our app user currently performing some important work, so other users should see him as busy.
All APIs I found allow to get user free/busy status, but not set. Is there public api for a writing side?
The free/busy time option on Microsoft Exchange is generated from the Outlook/Exchange Calendar entries from the users. These infos are fetched from the users calendar by the Availability service as written by Microsoft here. So if you wish to "SET" something, you need to create an calendar entry for the user. If you try to add something to the backend environment which is managed by Microsoft Exchange you might cause issues for the users as they do not see that in there calendars. That is also the reason why you are unable to find a "free/busy time writing API". So please create a calendar entry for your purpose and let the MS Exchange Availability service do the rest.
A good starting point to understand the construct is:
Availability service in Exchange 2013

Exchange Server Global Events

I'm looking to mirror contacts added to exchange in a separate system. I'd like to do this as contacts are added if possible.
I've seen some listeners available in the API I can use, but those look like they're on a user basis. To use them I think I'd have to have an instance open for every user and I believe they also only remain open for 30 minutes.
Is there anyway to get a notification whenever any user adds a contact to exchange?
No there is no such thing as global events in Exchange (not since 2007 anyway) the closest would be Transport agents but these are only useful for items that are traversing the Transport Pipeline. The application your developing will need to deal with things on a Mailbox by Mailbox basis.
Cheers
Glen

What is exchange web services better suited to do than office interop?

I'm designing a winforms application that will run on users machines at my company. One of its features will be to pull up upcoming appointments from the user's outlook account. I'm wondering what the primary purposes for both office outlook interop and exchange web services are so that I can choose the best one for this situation.
I would use Office interop primarily from within Outlook - for example, an Outlook Addin. In all other cases I would use EWS, primarily, because it removes the dependency on Outlook. If you use Outlook interop you need to care about the user having multiple outlook profiles and only working in the correct ones. You can use notifications (push, pull or streaming) to get notifications about changes in the users calendar so you don't have to constantly poll for changes.
You can pull appointments quite easily using the EWS Managed API:
EWS Managed API - Download: http://www.microsoft.com/download/en/details.aspx?id=13480
EWS Managed API - SDK: http://msdn.microsoft.com/en-us/library/dd633710(v=exchg.80).aspx

Sending Tasks using an offline Outlook

I've a scenario wherein I need to send/assign tasks from my browser UI to the concerned. This should happen with Outlook being offline (or for that matter outlook not even configured on the terminal) so that the user can be accessing a workflow from any terminal (using his/her AD credentials) and if required should have the ability to send a task to the concerned without having to return to his own terminal to be able to do so.
I envision that the user's credentials should be used to look up the AD for his/her email ID and send a task using the same from anywhere in the intranet.
Using Outlook object library I have been able to assign/send tasks, but with the Outlook being fired up and not otherwise.
Redemption does the sync of contacts while Outlook is offline but not tasks.
Kindly help if anybody has had a chance to do something similar.
Thanks in advance.
Redemption could help you here as you can run it it on a web server which will connect to you exchange env via mapi for you.
There are other ways dependant on you version of exchange EWS or Exchange DAV.
EWS comes with a managed API now a days to take some of the sting out of it.
There are similar 3rd party libraries for Exchange DAV as well.
They all contain contact and directory lookups.

Using MAPI w/ C++, how can I open another user's Inbox?

I'm looking to write an automated monitor script to programmatically retrieve information from another user's Exchange 2003 inbox. I have working C++ code to log into MAPI and connect to my own inbox. I can also use the Control Panel->Mail applet to configure another user's mailbox into my profile, and my code can access that way. However, this was done on my desktop with Outlook installed, which provides a richer mail profile editor.
Since this will run on a server, I'd prefer not to install Outlook at all. Instead, I can install the MAPI client. I then create a simple MAPI app that pops up the mail profile wizard using MAPILogonEx() with the MAPI_LOGON_UI flag. However, the basic MAPI client doesn't have the features to configure another user's mailbox. As a requirement, I can only run this script as the service account of the monitoring application, so I cannot tell it to run as the account whose mailbox I want.
Is it still possible to connect to another user's mailbox (assuming permissions are already granted) using the basic MAPI client? Or is it absolutely necessary to install Outlook for this functionality?
I would strongly recommend using the Microsoft Exchange MAPI Client (as you have linked). It is engineered to be far more robust than the Outlook version of these libraries. You should find the API no different between Outlook and Exchange Server with respect to Extended MAPI.
You will need to use Extended MAPI (as described by Cain T S Random) to open other mail stores, and of course your application will need to be logged in as the Windows user with appropriate permissions on the Exchange server.
I see... I'm not sure how to do that explicitly; that's usually a side effect of calling CreateStoreEntryID with the wrong flags. What's you're looking to do is probably:
Get an IID_IExchangeManageStore from your default message store
Call CreateStoreEntryID
Then open that store by the entry ID
LPEXCHANGEMANAGESTORE mapiObject = NULL;
store->QueryInterface( IID_IExchangeManageStore, (LPVOID *) &mapiObject);
mapiObject->CreateStoreEntryID( server, mailbox, OPENSTORE_TAKE_OWNERSHIP |
OPENSTORE_USE_ADMIN_PRIVILEGE, &len, &buffer);
//Call OpenEntry on the entry id
If you want a more detailed example, search the source of the MFC MAPI project for CreateStoreEntryID. If you have other questions, the best place to get them answered is the microsoft.public.win32.programmer.messaging newsgroup.
Have you looked into ConfigureMsgService? I believe that works with Exchange MAPI, or are you saying you tried that and it didn't work?

Resources