How can I send emails from an Azure runbook?

March 22, 2026 4 answers
Asked by CloudVoyager92
Hi everyone! I'm currently working in an Azure tenant using a Microsoft domain (contoso.onmicrosoft.com) and I'm looking to create a CSV list of users each month based on certain filters, then email that list to someone. My Entra ID domain doesn't have any O365 licenses or custom domain names. I've got the user filtering and Runbook set up using managed identity and the necessary permissions, but I'm unsure how to handle the emailing. I found some info that suggests using Azure Communication Services (ACS) for sending emails, but I'm uncertain if that's the best approach. I'd appreciate any insights or advice on this!

Answers

TechGuruX
You might want to look into using Microsoft Graph API instead. It's straightforward to implement with a managed identity and it allows you to send emails directly from specified mailboxes without needing to set up additional services.

CloudVoyager92: That makes sense! I actually have access to another tenant with O365 licenses. Can you share any resources on how to connect and send emails this way?

Reply to this answer
EmailPro99
ACS now supports SMTP, so it should work well for your needs. Alternatively, you might consider SendGrid as a simpler solution. ACS typically provides a default sending domain, while you'll need to set up your own for SendGrid, which could be a consideration depending on your requirements.

CloudVoyager92: Thanks for the tip! Not wanting to buy a new domain does make SendGrid less appealing for us.

Reply to this answer
SkyCoder88
Iโ€™ve had success using Azure Communication Services for notifications. I even created a Golang CLI tool for that purpose, which you can check out here: [azemailsender](https://github.com/groovy-sky/azemailsender). It's quite powerful if you're open to that route!

CloudVoyager92: Sounds interesting! But it looks a bit complex for my level. Why would I choose this over simpler options?

Reply to this answer
ScriptMaster2000
I've previously managed this with a PowerShell runbook that sends emails using the REST API of Azure Communication Services. It definitely can be done!

UserHelpPleaser: Did you mean Azure Communication Services? Just want to be sure!

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions