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
670 stars 96 forks source link

Outlook Calendar event unique ID is different in Outlook JS and Graph API #4729

Open ystvan opened 1 month ago

ystvan commented 1 month ago

Provide required information needed to triage your issue

For the same calendar event fetching the ID in Outlook JS and getting the it from MS Graph API returns slightly different strings: Notice that they differ only in the separator strings

+ is swapped with _ / is swapped with -

Outlook JS: AAMkAGUwYzI4OGZmLWY3YzAtNDNkMC04ZDljLTczZmJjMzM3Y2Y3ZgBGAAAAAAC0gTCu+FfeT5pt2ms+2dYpBwDXTgLnaOKqSLvwJ5eRN/89AAAAAAENAADXTgLnaOKqSLvwJ5eRN/89AAB94CiRAAA=

Graph API: AAMkAGUwYzI4OGZmLWY3YzAtNDNkMC04ZDljLTczZmJjMzM3Y2Y3ZgBGAAAAAAC0gTCu_FfeT5pt2ms_2dYpBwDXTgLnaOKqSLvwJ5eRN-89AAAAAAENAADXTgLnaOKqSLvwJ5eRN-89AAB94CiRAAA=

Your Environment

Expected behavior

The ID string is case sensitive and should not differ in any character regardless of platform

Current behavior

The ID string is case sensitive but differ in special characters based on platform

Steps to reproduce

Outlook JS in web

await Office.onReady();
const item = Office.context.mailbox.item;
return item.itemId;

Outlook JS in desktop

 const itemIdPromise = new Promise((resolve, reject) => {
     Office.context.mailbox.item.getItemIdAsync((result) => {
         if (result.status === Office.AsyncResultStatus.Succeeded) {
             resolve(result.value);
         } else {
             reject(result.error.message);
         }
     });
 });

Graph API

HTTP GET https://graph.microsoft.com/v1.0/me/events

Link to live example(s)

https://developer.microsoft.com/en-us/graph/graph-explorer

Provide additional details

Context

I need to Create an item in the database with the ID using Outlook JS, and at the same time I am subscribing to Outlook Calendar event change notifications by Graph API and I create also save the items to the database. Duplication detection is needed, thus I need to trust the ID is unique

Useful logs

https://github.com/ystvan/OutlookRepro Added @exextoc as a collaborator

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

ystvan commented 1 month ago

Hi @exextoc Team, I am curious if you had the chance to look into this yet? Cheers!