2

I am developing my first add-in for the Outlook Web App. It's not clear to me where I should store larger pieces of data provided by the user (e.g., big chunks of text, images) and to be associated with the add-in (as opposed to belonging to a particular mail item).

My impression is that RoamingSettings is supposed to be for relatively small stuff, and therefore not a good fit. I could store the data on OneDrive, but I prefer not to expose the data to the user outside of the add-in UI. I found this SO entry but the answer seems to be more applicable to desktop Outlook, not OWA. I suppose I could store the data on my own server if I need to, but I first I want to know if there's already something in the OWA architecture that would serve this purpose.

Community
  • 1
  • 1
Bob Arlof
  • 940
  • 10
  • 19

2 Answers2

4

RoamingSettings is the default choice for storing application/user settings/data, but there is a 32K limit that can be used per setting and 2MB total for all settings used by your add-in. An alternative approach is to use EWS to create a message in a hidden folder and store your data in the message body.

I created an implementation that serializes XML into the hidden message and back into JavaScript objects. You can see my article here (with sample app and source code in GitHub) on how to do it:

https://blogs.msdn.microsoft.com/mvpawardprogram/2016/01/26/unifying-your-web-dev-skills-for-office-add-ins/

Eric Legault
  • 5,706
  • 2
  • 22
  • 38
  • Just to clarify... Your answer states the RoamingSettings limit is 32K per add-in. However, your article states the limit is 2MB per add-in with a 32K limit for each setting. I assume 2MB is the correct value? – Bob Arlof Jun 01 '16 at 19:23
  • 1
    Yes, sorry - my earlier self is correct lol. That 2MB value may not be documented yet but I got that info from a Microsoft PM – Eric Legault Jun 01 '16 at 19:41
  • Oh - and thank you! Please rate that article when you get a chance – Eric Legault Jun 01 '16 at 19:45
  • Thanks for confirming the 2MB value. You may want to tweak the top of the article which can be read to mean there is a 32K limit per add-in.I tried to give the article 5 stars but the msdn.blogs sign in refuses to recognize my login. :-( I'll try it again later when I study the article in depth. – Bob Arlof Jun 01 '16 at 20:51
  • I can't edit it myself unfortunately, but you're probably the only one who cares LOL. I'm glad somebody finally finds it useful! – Eric Legault Jun 02 '16 at 04:45
  • NM, you meant my answer, not my article - will fix! – Eric Legault Jun 02 '16 at 04:46
  • You were right the first time, I was referring to the top of your msdn blog article, but I didn't realize you can no longer edit it. I have a feeling that article will prove more important in the future since it addresses a fundamental need in OWA add-ins. OWA is a nice web app and I suspect a lot more people may start relying on it, which would attract more add-in developers. It will be interesting to see what happens. – Bob Arlof Jun 03 '16 at 04:01
  • I actually developed this approach for managing roaming settings for my desktop COM add-ins to synch app settings across the user's PCs using their Mailbox as the container. The support for RoamingSettings in the Mailbox API seemed sufficient but I quickly hit a limit when developing my MessageFiler add-in (http://www.rockinsoftware.ca/MessageFiler.html). Hopefully others will find this approach useful but I suspect it is more of an edge case than anything. – Eric Legault Jun 03 '16 at 15:45
0

I am a developer for Microsoft working on Outlook addins.

You should store the larger data with your service / on your server as you noted. A message is generally not suited for storing random data for your addin. Using makeEwsRequestAsync requires a ReadWriteMailbox for addin permission that may not be necessary otherwise.

Another note is that the 32K limit is the limit for RoamingSettings per addin for Outlook. It's not 2MB.