Issue with Automated File Sharing via Graph API – Invitation Emails No Longer Sent

Kolb, Jannik 5 Reputation points
2024-11-18T18:35:58.7633333+00:00

Hello everyone,

I’m using the following C# code to automate file sharing via the Microsoft Graph API:

var requestBody = new InvitePostRequestBody  
{  
    Recipients = driveRecipients,  
    Message = message,  
    RequireSignIn = true,  
    SendInvitation = true,  
    Roles = ["write"],  
    ExpirationDateTime = DateTime.Now.AddDays(7).ToString("o"),  
};  

await GraphClient.Drives[driveID].Items[driveItemID].Invite.PostAsInvitePostResponseAsync(requestBody);  

This approach worked flawlessly until November 14, 2024. Starting from that date, no invitation emails are sent to the recipients anymore. The file sharing itself still works as expected – I can verify in OneDrive that the recipients are listed under the "Sharing" section. However, the notification emails to the recipients are missing.

Also, if I share a file manually, the invitation Mails gets send still.

Has anyone encountered a similar issue or has an idea what might be causing this? Could this be related to a change in the API or some configuration I might have overlooked?

Thank you in advance for your support!

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,098 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Yanli Jiang - MSFT 27,566 Reputation points Microsoft Vendor
    2024-11-19T03:26:37.01+00:00

    Hi @Kolb, Jannik ,

    Welcome to Q&A forum!

    Is there any error message about this?

    According to your description, the problem seems to be related to the API, but I checked the official documentation Send a sharing invitation and there recently is no update about this API. It may also be that there is a problem in the API call process. Due to the limited forum permissions, we recommend that you submit a service request. The support team over there has the correct escalation channel, they can involve more resource and investigate the behavior from back end as fast as possible. They also can check the behavior on your end remotely. For reference: Get support - Microsoft 365 admin | Microsoft Docs.

    Good day!


    If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


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.