Sending email with service account from Azure automation using Graph

Bombbe 1,611 Reputation points

Hello, Is it possible to send emails with a Service Account from Azure Runbooks without using "application permissions"? For instance, if I create an Azure AD application and assign API permissions to it as following User's image

Then I create a Service Account (e.g., and add it to the "Users and groups" blade for the application. Should I be able to send emails automatically with Azure Runbooks using only the Service Account's name?

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

1 answer

Sort by: Most helpful
  1. Vasil Michev 91,276 Reputation points MVP

    Sure, it's possible, but how do you plan to authenticate? Unless you want to use the insecure ROPC flow, authentication will need to be interactive, i.e. someone will have to type the credentials, or approve a request.

    For this reason, the usual approach is to authenticate as an app, or leverage an Azure managed identity. If you are worried about the permissions needed for such approach and their scope, you can configure additional controls on Exchange Online side to restrict access to just a given account/mailbox. Here's a sample article that details the process:

    0 comments No comments