Microsoft Graph Search API on mail messages

Ward Horsfall 101 Reputation points
2022-06-17T17:37:57.03+00:00

Hi

What authentication methods is the compatible with?

When I say authentication methods I don’t know if I am using the right term.

I am hoping I can use one just with Tennent id, client id and client secret and that is it,

Something really simple I hope.

Thanks
Ward

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

Accepted answer
  1. ShivaniRai-MSFT 2,726 Reputation points
    2022-06-22T14:37:14.6+00:00

    Hi @Ward Horsfall ,

    You can follow this documentation on how to use search query for mail messages. The search applies to the body and attachments of messages in the signed-in user's own mailbox which means this API works only with delegated permission. To generate access token for this scenario please follow this documentation on access token with delegated permissions.
    For this authorization method you need Tennent id, client id and client secret.

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

    0 comments No comments

0 additional answers

Sort by: Most helpful