How can I send emails from an Azure Runbook?

0
22
Asked By CuriousPineapple42 On

I'm currently working within an Azure tenant that uses the Microsoft domain contoso.onmicrosoft.com. My goal is to create a CSV list of users every month based on specific filtering criteria, and then email that list to a designated recipient. However, the Entra ID domain I'm dealing with lacks O365 licenses and custom domain names. While I'm familiar with filtering the user list and have managed to get the Runbook functioning with a managed identity and system-assigned permissions, I'm uncertain about the process of emailing the list itself. After some quick research, I found references to using the Azure Communication Services (ACS) for sending emails. Before diving too deep into learning ACS, I'd like to know if it's a good choice for this task.

4 Answers

Answered By PowerShellPro45 On

I've successfully set this up in the past using a PowerShell runbook alongside the REST API from the communication services to send emails, so it is certainly doable. Just be mindful of what services you choose to implement.

Answered By GolangGuru77 On

Using Azure Communication Services for sending notifications is definitely a viable option! I've even created a Golang CLI tool for it, which you might find useful. Check it out [here](https://github.com/groovy-sky/azemailsender) if you're up for some external scripting.

Answered By SimplicitySeeker23 On

ACS does support SMTP now, so it should work fine for your needs. Another straightforward option is SendGrid, which is typically easier to set up. I’d recommend comparing both for integration and authentication since ACS provides a default sending domain, whereas SendGrid does not.

Answered By HelpfulHacker98 On

Have you thought about using Microsoft Graph? You can implement it with a managed identity that limits access to specific mailboxes. This method could simplify sending your email while keeping everything secure.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.