Email search issue with IdType="ImmutableId"

Kanishka Hewapathirana 30 Reputation points
2023-05-17T09:16:25.2733333+00:00

Hi guys,

We found a problem related to email search. On this week, suddenly found that this functionality is not working now. This functionality worked quite fine on our application without any problem.

User's image

User's image

But after remove this Prefer : IdType="ImmutableId, then it is working fine. But not recommended approach right now. I just want to confirm that any changes has been done on Microsoft side. We have not done any changes to the system

User's image

We found our clients are escalating this problem. And I found someone has post this same problem

https://learn.microsoft.com/en-us/answers/questions/1282123/idtype-immutableid

Please assist ASAP with this

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,511 questions
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 36,651 Reputation points
    2023-05-19T07:11:41.91+00:00

    Hi @Kanishka Hewapathirana

    I noticed that some members of the community have encountered the same problem recently, and I can also reproduce the problem locally. The Prefer: IdType="ImmutableId request header may no longer be available, I suggest you open a support ticket to confirm with the team. You can raise support ticket from:

    http://aad.portal.azure.com or https://admin.microsoft.com/#/support/requests.

    Hope this helps.

    If the answer is helpful, please click Accept Answer and kindly upvote. If you have any further questions about this answer, please click Comment.


3 additional answers

Sort by: Most helpful
  1. Ab-8756 800 Reputation points
    2023-05-18T19:46:46.3866667+00:00

    Hello Kanishka Hewapathirana,
    Thank you for your post in this Q&A Forum.

    I have doubled checked with Microsoft resources; I am not seeing any changes done from our end. Here is the Microsoft Graph Changelog article(https://developer.microsoft.com/en-us/graph/changelog/?search=&page=2#) with the list of changes, addition, Deprecation, Deletion.

    Also the article https://learn.microsoft.com/en-us/graph/outlook-immutable-id also mentioned Prefer: IdType="ImmutableId" as an optional feature for Microsoft Graph.
    Could you please try to create a draft message using the Prefer: IdType="ImmutableId" header and then sent the message, once the message is the sent, try to pull up the message with Immutable ID.

    It would be good idea to you create a support ticket with Graph team, if you would like to investigate it further.

    Hope this helps.
    Thanks.
    --please don't forget to upvote and Accept as answer if the reply is helpful--


  2. Kanishka Hewapathirana 30 Reputation points
    2023-05-19T07:16:19.5933333+00:00

    Hi ,

    Thanks for quick response.

    Here we are already using Prefer: IdType="ImmutableId" concept for email sending and other email based functionalities. They are working fine. As well we have also outlook add-in integrated to outlook email client. On that application , ImmutableId is in use. But this problem is generated when searching email only.

    Please check following details :-

    .../GraphApi/v1.0/me/mailFolders/AAMkAGViYmJmMmRjLTVmNjUtNDQyZS04MTM0LWY3ZjBmZWM4ZDliZAAuAAAAAADM7NK_8RXaQKEzwwdaMvc1AQDzqY6QOPjgQJIKzwGu2LUFAAAAAVb1AAA=/messages?$top=20&$search=%22DPS%22&$count=true&$expand=Microsoft.Graph.EventMessage/event($select=id),attachments($select=microsoft.graph.fileAttachment/contentId,id,isInline,contentType,name,size),singleValueExtendedProperties($filter=id%20eq%20%27Integer%200x1080%27%20or%20id%20eq%20%27SystemTime%200x1082%27)

    This is error
    "value": [
            {
                "error": {
                    "code": "ErrorInvalidIdMalformed",
                    "message": "Id is malformed."
                }
            }

    And responses come with 200 status code. That's why it is confused.

    Thanks

    Kanishka


  3. JP 0 Reputation points
    2023-10-21T23:25:43.7066667+00:00

    I am running into the same issue using messages search. It is not returning immutable id. Here is an example of the call I am making where ImmutableId is not returned :-(

    let requestUrl = `me/mailFolders/Inbox/messages?$select=id,from,toRecipients,subject,bodyPreview&$search="participants:${emailAddress}"`;
    
        while (true) {
          const response = await client.api(requestUrl)
            .header("Prefer", 'IdType="ImmutableId"')
            .get();
    
    0 comments No comments