0

If a user is added to a Microsoft 365 group, they receive new mails in their inbox,

but previous mails remain inside the group mailbox (visible in Outlook under Groups).

I want to search a work order number in both:

1. The user's inbox

2. The group conversations (previous group mails)

To search inside the user's inbox, I used:

GET https://graph.microsoft.com/v1.0/me/messages?$search="{workOrder}"&$select=subject,bodyPreview,webLink,from,receivedDateTime

To search inside the groups, I used:

GET https://graph.microsoft.com/v1.0/groups/{groupId}/threads?$expand=posts($select=id,body,receivedDateTime,from)&$select=id,topic,lastDeliveredDateTime&$top=50

The issue is that group messages don’t include a `webLink` property.

I also tried manually constructing a webLink like this:

https://outlook.office365.com/mail/group/{groupId}/conversations/{conversationThreadId}

But this only redirects to Outlook and not to the specific message.

Is there any way to get the `webLink` (or a similar URL) for group mails using Microsoft Graph?

These are the scopes I’m currently using:

Mail.Read

Mail.ReadWrite

Mail.Send

User.Read

Mail.Read.Shared

Group.Read.All

ChannelMessage.Read.All

Team.ReadBasic.All

Channel.ReadBasic.All

offline_access

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.