Microsoft Graph API notification on invite to a folder/file is not working

Joshua 20 Reputation points
2024-11-29T02:52:20.18+00:00

Hello, I am currently using this api https://graph.microsoft.com/v1.0/sites/${sharepoint_id}/drive/items/${file_id}/invite that invites a recipient to read/edit a document it's working but it's not notifying or sending an email to the recipient even the sendInvitation is set to true.

Here is my payload:

{
  "recipients": [
    {
      "email": "sample@mail.com"
    }
  ],
  "message": "Sample Message",
  "requireSignIn": true,
  "sendInvitation": true,
  "roles": ["read"]
}
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,520 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,123 questions
0 comments No comments
{count} votes

Accepted answer
  1. Yakun Huang-MSFT 7,430 Reputation points Microsoft Vendor
    2024-11-29T06:12:40.5266667+00:00

    Hello Joshua,

    Thank you for reaching out to Microsoft Support!

    Many people have recently experienced issues similar to yours, using application permissions with corresponding success but not sending mail, and have no problem with delegated permissions, so the issue may have occurred when the API side changed.

    It is recommended that you use delegated permissions or open a support ticket instead.

    Similar questions submitted by other users:

    https://learn.microsoft.com/en-us/answers/questions/2121575/problem-when-sending-out-the-invitation

    https://learn.microsoft.com/en-us/answers/questions/2120455/issue-with-automated-file-sharing-via-graph-api-in

    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 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.