msgraph-sdk-go icon indicating copy to clipboard operation
msgraph-sdk-go copied to clipboard

webLink not working when using ImmutableId

Open eqinox76 opened this issue 1 year ago • 0 comments
trafficstars

Describe the bug

I want to create links to emails or their conversation. As the links should be stable when moving email i am using req.Header.Add("Prefer", "IdType=\"ImmutableId\"") as described in https://learn.microsoft.com/en-us/graph/outlook-immutable-id to get the id.

The webLink property provides a link which shows "This message might have been moved or deleted". The same message provides a working webLink when not using ImmutableId.

Expected behavior

Get a valid webLink when using ImmutableId.

How to reproduce

List emails with the Prefer: IdType="ImmutableId" header set. Try accessing the email using the probided webLink Url.

SDK Version

v1.51.0

Latest version known to work for scenario above?

No response

Known Workarounds

Debug output

No response

Configuration

No response

Other information

Trying to build the link manually only works while the message is still in the inbox.

Example:
conversationId: AAQkADM1MTJhY2UwLTYyNDMtNDc1Yi04ZGUzLTE4NGI0MGE0MTg4MgAQAPDJOn2Ar1xIjm37Hjxp%2BNM%3D
parentFolderId: AQMkADM1MTJhY2UwLTYyNDMtNDc1Yi04ZGUzLTE4NGI0MGE0MTg4ADIALgAAA0uCyZ1qbuxJsLGOEVa6A2oBAN9vEgrvggBIsYiaysPxSHwAAAIBDAAAAA%3D%3D

As long as the message is in the inbox folder the following link works fine: https://outlook.office.com/mail/[email protected]/inbox/id/AAQkADM1MTJhY2UwLTYyNDMtNDc1Yi04ZGUzLTE4NGI0MGE0MTg4MgAQAPDJOn2Ar1xIjm37Hjxp%2BNM%3D

But moving it to a folder the email can no longer be reached by using the ParentFolderId. The website only shows the folder. Not the conversation. https://outlook.office.com/mail/[email protected]/AQMkADM1MTJhY2UwLTYyNDMtNDc1Yi04ZGUzLTE4NGI0MGE0MTg4ADIALgAAA0uCyZ1qbuxJsLGOEVa6A2oBAN9vEgrvggBIsYiaysPxSHwAAAIBDAAAAA%3D%3D/id/AAQkADM1MTJhY2UwLTYyNDMtNDc1Yi04ZGUzLTE4NGI0MGE0MTg4MgAQAPDJOn2Ar1xIjm37Hjxp%2BNM%3D Which is very confusing as manually navigating to the folder and conversation shows the same url in a browser. But entering (or copying to a new tab) only shows the folder. Not the conversation.

eqinox76 avatar Oct 24 '24 07:10 eqinox76