microsoftgraph / microsoftgraph/msgraph-sdk-go

webLink not working when using ImmutableId

Open
#795 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status:waiting-for-triage type:bug
Dominant language
Go
Stars
335
Forks
43
Avg merge
15h 19m
Merged PRs (30d)
3

Description

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/myemail@provider.com/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/myemail@provider.com/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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by reproducing the email listing with the Prefer: IdType="ImmutableId" header and compare the returned webLink with a link from the same message without that header. Done means determining whether the SDK can produce a valid link that continues to work after the message moves, or documenting the service limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.