OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
690 stars 95 forks source link

Outlook Roaming Settings Synchronization Between Outlook on the web and Outlook Desktop (Mac/Windows) & vice-versa #5080

Open rohanbharadwaj1994 opened 1 week ago

rohanbharadwaj1994 commented 1 week ago

Provide required information needed to triage your issue

We're experiencing an issue where roaming settings saved in Outlook on the web are not immediately synchronized with the Outlook desktop applications on Mac and Windows. To see the updated settings in the desktop app, we currently have to restart Outlook on these platforms. This is also happening the other way around as well, if we save settings via Mac/Windows desktop app then also we have to reload the Outlook tab on browser to get the updated settings

Your Environment

Expected behavior

Roaming settings should sync across platforms without platform reload or restart.

Current behavior

Roaming settings is not syncing across platforms without platform reload or restart. This creates a problem for the user to restart the platform again which is not the ideal and good experience

Steps to reproduce

  1. Deploy and install Add-in, keep outlook desktop app open
  2. Open Taskpane in outlook on the web
  3. Save any random strings using roaming settings Office.context.roamingSettings.saveAsSync()
  4. Open Windows/Mac desktop
  5. We will not get the updated setting saved from OWA on Desktop app without restarting the app

Useful logs

Here's the difference b/w both Mac desktop and outlook on the web app when not reloaded. These settings are getting saved in roaming settings

Screenshot 2024-11-13 at 11 47 10 AM Screenshot 2024-11-13 at 11 46 24 AM
anjalitp commented 1 week ago

@rohanbharadwaj1994 Are you referring to New Outlook Windows or Classic Outlook Windows here?

manuelsidler commented 1 week ago

We have the same issue with our add-in (tested with Outlook Mac and Outlook Web). I can reproduce it with Script Lab:

HTML snippet:

<input type="text" id="foo"></input>

<button id="set" class="ms-Button">
    <span class="ms-Button-label">Set</span>
</button>

<button id="load" class="ms-Button">
    <span class="ms-Button-label">Load</span>
</button>

JavaScript snippet:

$("#set").on("click", setSettings);
$("#load").on("click", getSettings);

function setSettings() {
  Office.context.roamingSettings.set("foo", $("#foo").val());
  Office.context.roamingSettings.saveAsync((result) => {
    console.log(result);
  });
}

function getSettings() {
  const setting = Office.context.roamingSettings.get("foo");
  $("#foo").val(setting);
}
  1. Set setting on Outlook Mac
  2. Load setting on Outlook Web
  3. Result: setting doesn't appear
  4. Refresh browser tab
  5. Load setting on Outlook Web
  6. Result: setting does appear

Same for vice-versa:

  1. Set setting on Outlook Web
  2. Load setting on Outlook Mac
  3. Result: setting doesn't appear
  4. Restart Outlook Mac
  5. Load setting on Outlook Mac
  6. Result: setting does appear
rohanbharadwaj1994 commented 1 week ago

@anjalitp Referring to New outlook on windows. But this is on almost every platform including Mac desktop, New outlook on windows and OWA

mobisw-msft commented 2 days ago

Hey,

Thank you for pointing out this issue. We have added it to our backlog- however, we have no timelines to share at this point. However, do note, that according to documentation, Outlook for Web behaves as expected- and this behavior is unlikely to change:

Internal Tracking ID: 5082151

image