Outlook item to webDAV location - exchange-server

I have a web application which has a calendar, and I want to allow that calendar to be sync'd with an Exchange server.
I've written code to create appointments on an Exchange server directly in a user's calendar using webDAV. I save the appointment locations (URLs) so I can update the appointments in outlook if something changes in my application.
I'm trying to write an add-in for Outlook that lets a user send their appointment to my web application. In order to save it though (and allow updates in my application to propagate back to Exchange) I need to figure out what the appointment location (URL) is in WebDAV.
Is there any way to get the WebDAV URL of the appointment from within Outlook? I'm using VSTO for my outlook add-in.

Thanks for the help guys!
This question helped considerably:
How to use WebDav to match dav:href to Outolook Interop href value
And this website was interesting too:
http://www.infinitec.de/post/2007/03/Constructing-OWA-2007-item-ids-from-WebDAV-items.aspx

Related

How to send an email from an outlook office add on?

I am trying to build an outlook add on, using react. I looked everywhere trying to find something that uses the mailbox in which the addon has been opened from, to programmatically send an email to a specified user.
Something similar to the google's command:
GmailApp.createDraft(e.parameters.address, e.parameters.subject, e.parameters.body, {
htmlBody: e.parameters.body,
name: 'Automatic Sender'
}).send();
Is the mail-sending process available on outlook?
Outlook web add-ins work under the context of currently selected item only. OfficeJS doesn't provide anything for creating and sending emails programmatically.
In Outlook add-ins you may consider using EWS, see Call web services from an Outlook add-in for more information. Also you may take a look at the Graph API as a possible workaround.

Is there an Outlook Javascript API to get control to addin on Saving as Draft or before syncing to server?

I am working on an Outlook addin to make sure confidential information is not leaked using mail.
Using the on-send feature using ItemSend, we were able to get the email fields and block the sendmail, if required
https://github.com/OfficeDev/Outlook-Add-in-On-Send/tree/master/outlook-add-in-on-send
But there is an use case
User composes the mail and saves it to draft (without clicking on Send)
In outlook on web, composing a mail saves to draft automatically.
How can the add-in get a callback when draft is synced to Outlook server ?
How can the add-in get a callback when draft is synced to Outlook server ?
There is no such callback available for web add-ins. You may post a feature request or suggest a feature on the Tech Community site where community members get to share ideas on ways MS can make Microsoft Graph and Office Platform better by sharing feature requests and ideas.
Nothing like that for the JS-based addins.
For the COM addins, OOM exposes MailItem.Write event - your event handler can cancel the operation.

Is it possible to detect when the user changes the date of an appointment directly from the calendar?

I am writing an outlook web Add-In where the user can create an appointment and book a meeting room through the software.
The problem is that once the user closes the Add-In and goes back to the calendar, they can freely change the date of the appointment by dragging it around, and the Add-In cannot see those changes, since it's not open.
That means that those changes do not get registered into the system and are essentially only local to the user who made them. I need a way that I can detect whenever the user changes the date of an appointment, so that I can update the data on my end.
I have heard about subscribing to notifications but I'm not sure that is the best solution. Any Ideas would be highly appreciated.
Not from a web addin - you can do that from a standalone app that continuously runs and uses either the Outlook Object Model (Items.ItemChange event) or EWS to receive the folder notifications. Or you can do that from a COM addin that uses the Items.ItemChange event.

Outlook Web Addin - Event handlers

I have a business requirement where there is a need to extend the functionality of outlook.
I am exploring Office Web Addins for this requirement.I have following queries.
I need to automatically move all incoming email to an external location.Does Office JS API provide handlers to incoming email event?
If it possible to define an action with Office JS API , which when triggered can loop through all the current unread emails and perform some action on each email (like move certain emails to a certain external location )
Is it possible to append custom headers to a email being composed using Outlook web add-in?
No
You can use EWS for that
No.
If your code only needs to run under the Windows version of Outlook, a COM addin might be a better option.
Unfortunately, it seems not possible to meet your requirements using Outlook Web Addin.
For more information, please review the following link: Outlook Add-ins overview

Outlook 365: Keeping specific events in sync with external system

I'm developing an integration with Outlook in Office 365 using the latest office.js api for add-ins.
What I have currently is an add-in, which displays a side pane on the appointment compose form. Inside that pane I have the functionality to create an object in our external based on the appointment, taking the start/end times, subject, location etc.
So I have appointment A in the calendar of an O365 account, and object A in an external system.
Is there a way to keep those in sync? I don't see it could be possible using the Outlook Add-In Javascript API, but maybe using ics files, or the Outlook REST API, or Exchange EWS? I see here plenty of issues with the credentials, as the user has separate credentials in our system.
Any tips? I tried to send from our system an ICS file with same iCal UID, but Outlook ignores it.
You would want to to use the Outlook Push Notifications REST API in your web service to get polled when users make changes to their Calendar. Then use the Outlook Calendar REST API to sync changes from your system to their Calendar.

Resources