Sending mail from a shared mailbox in Azure Function with System Managed Identity

Clinton van Axel 126 Reputation points


I have created an Azure Function App with a System Managed Identity and granted it the necessary Mail.Send API permissions. However, I am unable to send mails from a shared mailbox. The error message I receive is:

The user account which was used to submit this request does not have the right to send mail on behalf of the specified sending account., Cannot submit message.

I only have application API permission and I know that the error is showing delegated permissions, but that is not possible with an Enterprise application. Can someone guide me on how to resolve this issue?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,437 questions
{count} votes