Manuel
Manuel

Reputation: 33

Mailbox item id mismatch between Office.js and Graph

I'm developing an Outlook add-in, in which I grab the mailbox item id and send it to an API. The API uses the Microsoft Graph SDK to fetch the message item by the given id. This scenario worked fine so far, but now I'm struggling with a strange format mismatch between the id I get from Office.js and the id from Graph.

Office.context.mailbox.item.itemId returns ...MlPrBwD/Cohwu0F...

Graph returns ...MlPrBwD-Cohwu0F

So Office.js returns the id containing /C where Graph returns -C in it.

Any ideas?

Upvotes: 2

Views: 569

Answers (1)

user2250152
user2250152

Reputation: 20625

I'm not sure but I think that the id returned by Office.context.mailbox.item.itemId is an EWS item id.

You can convert it to rest/graph item id by using Office.context.mailbox.convertToRestId.

Upvotes: 2

Related Questions