Sending Email with Microsoft Azure (2024)

(information)

Info

This documentation applies to the most recent version of the Twilio SendGrid integration for Microsoft Azure. For documentation on the previous version, see the SendGrid documentation or related Azure documentation.

This guide will help you create and configure a Twilio SendGrid account using Microsoft Azure. Once your account is ready, you'll be on your way to delivering email at scale.

Create an Azure Subscription

create-an-azure-subscription page anchor

To get started with Twilio SendGrid and Azure, visit the Azure Portal home page. You will need to sign in or create a Microsoft account if you do not already have one.

Once logged in, select the Subscriptions icon under the Azure services menu.

Sending Email with Microsoft Azure (1)

A new page will load, listing your current Azure subscriptions. You can add a new Twilio SendGrid service to an existing Azure Subscription or Select +Add to create a new Azure Subscription. For more information about Azure Subscriptions and billing, see the Azure docs for how to "Create an additional Azure subscription."

For this guide, we will create a new Azure Subscription.

Sending Email with Microsoft Azure (2)

If you already have an Azure account set up for billing, you will be taken to a page where you can create an Azure Subscription.

(information)

Info

If you are creating your first Azure Subscription, you will first need to select a billing offer for your Azure Subscription. You will be guided through the Azure offer signup process. You can return to this guide once your billing setup is complete.

A form will load with a Subscription Name field. You must add a name — we recommend something that clearly differentiates the subscription. All the other fields are already populated and cannot be edited. Click Create.

Sending Email with Microsoft Azure (3)

Once the Subscription is created, you will see it listed on the Subscriptions page. If you do not see the Subscription, try refreshing the list.

(information)

Info

If you have multiple Azure Active Directory tenants, be sure you are viewing the tenant your subscription is assigned to. You can select Switch directories to view your additional tenants. For more on Azure AD, see "Associate or add an Azure subscription to your Azure Active Directory tenant."

Sending Email with Microsoft Azure (4)

Create a Twilio SendGrid account

create-a-twilio-sendgrid-account page anchor

From the Azure portal home page, select Marketplace under Azure services. If you do not see the Marketplace icon, you can search for it by selecting More services.

Sending Email with Microsoft Azure (5)

The Azure Marketplace provides many services, including the Twilio SendGrid email service. You can find it by searching for "Twilio SendGrid". You will also find it under Software as a Service (SaaS).

Click the Twilio SendGrid resource to load a page where you can select your account tier. You can start with a free account and upgrade as your sending needs change. See the Twilio SendGrid pricing page to understand what's included with each plan.

Sending Email with Microsoft Azure (6)

Sending Email with Microsoft Azure (7)

Select Set up + subscribe. You will be taken to a page where you can assign your Twilio SendGrid account to an Azure Subscription and Resource Group. Once you have completed the required fields, select Review + subscribe.

Sending Email with Microsoft Azure (8)

You will be asked to agree to Azure's term of services. You can now review your order and click Subscribe.

It takes a few moments to establish your account. You will be shown a progress screen. When the setup is complete, you will be able to click the Configure account now button to be taken to the Twilio SendGrid App. You will also receive an email when the subscription setup is complete.

Sending Email with Microsoft Azure (9)

Twilio SendGrid account setup

twilio-sendgrid-account-setup page anchor

Before sending your first email, you will need to complete the following Twilio SendGrid account setup. These requirements help secure your account and keep your messages from landing in spam folders.

  • Configure Two-factor authentication
  • Create an API key
  • Complete Sender Authentication

Two-factor authentication

two-factor-authentication page anchor

Twilio SendGrid uses Two-factor authentication (2FA) to help protect your account. To enable 2FA, navigate to Two-Factor Authentication in the Twilio SendGrid Settings menu, and click Add Two-Factor Authentication.

Sending Email with Microsoft Azure (10)

A modal will open where you can complete the 2FA setup. Click Ok, Got it to continue.

(warning)

Warning

If you have previously configured services to authenticate with Twilio SendGrid APIs using Basic Authentication, enabling 2FA will break those integrations. You must use API keys to authenticate with Twilio SendGrid APIs.

Sending Email with Microsoft Azure (11)

Twilio SendGrid supports 2FA using either SMS or the Authy App. Select your preferred 2FA method, and click Next.

You will need to enter a phone number to complete the 2FA process. SMS users will be sent a confirmation code at the number they entered. Authy users will be sent instructions for downloading and completing the 2FA setup using the Authy app.

API keys

api-keys page anchor

API Keys authenticate your application, mail client, or website with Twilio SendGrid services. Unlike a username and password, API keys are scoped to provide access only to the services you select. You can also delete and create API keys without impacting your other account credentials. For these reasons, Twilio SendGrid requires you to connect to its services using API keys.

Create an API key

create-an-api-key page anchor

In the Twilio SendGrid App, navigate to API Keys in the Settings menu, and select Create API Key.

Sending Email with Microsoft Azure (12)

A modal will open where you can create your key. You must name the API key — we recommend something that will clearly differentiate the key from others you may create in the future.

Sending Email with Microsoft Azure (13)

You must also select the type of key you want to create. Twilio SendGrid provides three types of API key:

  • Full Access
  • Restricted Access
  • Billing Access

To keep your account secure, you should give each key the least privilege(link takes you to an external page) necessary. You can limit a key's capabilities by creating a Restricted Access key and selecting a subset of all the possible permissions. For more about managing Twilio SendGrid API keys, see the Twilio SendGrid API keys documentation.

(information)

Info

For security reasons, Twilio SendGrid API keys will be displayed to you at the time of creation only. Be sure to copy your key and store it somewhere secure like your Azure Key Vault. If you lose your key, you must create another — it's not possible to recover a lost key. The permissions assigned to a key can be modified after it's created.

Use an API key

use-an-api-key page anchor

Twilio SendGrid's v3 APIs expect an API key to be passed in an Authorization header as a Bearer Token. See the Twilio SendGrid v3 API reference for help using your key to send your first email.The Twilio SendGrid helper libraries all provide a method to set your key, handling the authentication via Bearer Token for you. See the Twilio SendGrid developer documentation for helpful code examples and links to helper libraries in C#, Go, Java, Node.js, PHP, Python, and Ruby.When using Twilio SendGrid's SMTP integration, you will set your API key as a password via Basic Authentication. Your username must always be the string, "apikey." Using the account credentials (username and password) you set up through Azure will fail, so be sure to set your password to the 14 digit API key provided by the Twilio SendGrid App. Your account credentials are separate from the credentials used to authenticate with Twilio SendGrid's APIs and SMTP services.


_10

username: "apikey"

_10

password: <your-api-key>


Sender Authentication

sender-authentication page anchor

Twilio SendGrid requires customers to complete Sender Authentication. This requirement protects your domain's reputation as an email sender and helps uphold legitimate sending behavior by Twilio SendGrid customers.

Setup includes domain authentication. Twilio SendGrid will provide DNS records that you must add to your domain. For instructions on the domain authentication process, see "How to Set Up Domain Authentication."

Change, unsubscribe, reactivate your Twilio SendGrid plan

change-unsubscribe-reactivate-your-twilio-sendgrid-plan page anchor

You can upgrade or downgrade your Twilio SendGrid plan to accommodate your email sending needs as they change. If you no longer need the Twilio SendGrid service, you will also unsubscribe through the Azure portal.

From your Azure portal's Subscription overview page, select Resources and click your Twilio SendGrid resource (it is labeled "Contoso" in the following examples).

Sending Email with Microsoft Azure (14)

A detail page will load where you can modify your Twilio SendGrid subscription.

Sending Email with Microsoft Azure (15)

Upgrade or downgrade your plan

upgrade-or-downgrade-your-plan page anchor

To upgrade or downgrade your plan, select Change plan from the Twilio SendGrid resource detail page. There are two locations where you can select Change plan — selecting Change subscription will allow you to modify your Azure subscription, not your Twilio SendGrid plan.

Sending Email with Microsoft Azure (16)

A modal will open, displaying the available plans with your current plan selected. Select a new plan, and click Change plan. You will see a confirmation message on the page when your plan has been updated.

Unsubscribe from Twilio SendGrid

unsubscribe-from-twilio-sendgrid page anchor

To unsubscribe from Twilio SendGrid, select Unsubscribe from the Twilio SendGrid resource detail page.

Sending Email with Microsoft Azure (17)

A modal will open asking you to select the reason for ending your subscription. Select an option that best describes your situation, and click Unsubscribe.

Sending Email with Microsoft Azure (18)

You will receive a confirmation message when your subscription has been removed.

Reactivate your Twilio SendGrid account

reactivate-your-twilio-sendgrid-account page anchor

If you have unsubscribed from Twilio SendGrid and need the service again in the future, you will need to create a new subscription. If your account has been suspended, you can reactivate the service by paying any outstanding account balance. Once payment has been received, you'll be able to reactivate your account.

Sending Email with Microsoft Azure (2024)

FAQs

Can you send emails from Azure? ›

Send emails from Azure with Azure Communication Service. Azure Email or Azure Communication Service Email is a new feature that allows users to send bulk emails directly from their app. It can be integrated with ready-made software development kits (SDKs) for four programming languages: C#, JavaScript, Java, and Python ...

Does Azure have an email service? ›

An Azure account with an active subscription. Create an account for free. An Azure Email Communication Services resource created and ready with a provisioned domain. Get started with creating an Email Communication Resource.

Does Azure have an SMTP service? ›

Email SMTP support in Azure Communication Services offers a strategic solution to simplify the sending of emails, strengthen security features, and unify control over outbound communications. As a bridge between email clients and mail servers, SMTP support improves the effectiveness of email delivery.

Can I use Azure with Gmail? ›

Yes, this is certainly possible, and it is a very common scenario. You can create a federation between your Azure AD and Google, and allow users to login with Google accounts without the need to create Microsoft accounts or identities for them.

What are the email limitations for Azure? ›

Name
NameLimit
Number of recipients in Email50
Total email request size (including attachments)10 MB
May 30, 2024

Is using Azure free? ›

We'll never charge you unless you decide to move to pay-as-you-go pricing. If you move to pay as you go, you'll only be charged for services that you use above the free monthly amounts. You can check your usage of free services in the Azure portal.

How to send email notifications from Azure? ›

You can send email notifications to individuals or to all users with specific Azure roles.
  1. Sign in to the Azure portal.
  2. Navigate to Microsoft Defender for Cloud > Environment settings.
  3. Select the relevant subscription.
  4. Select email notifications.
May 22, 2024

Does Microsoft have an email service? ›

Accounts such as an outlook.com, hotmail.com, live.com, or msn.com account, are managed by Microsoft, and therefore already considered Microsoft accounts.

How to setup a mail server in Azure? ›

Configure SMTP server
  1. Open the Azure DevOps Server Administration Console from the Start menu. Or, at a command prompt, enter TFSMgmt.exe. ...
  2. Select Alert Settings.
  3. Enable email alerts and specify the SMTP Server and the email address to use for sending emails. ...
  4. Verify your configuration: Open your personal notifications.
Sep 12, 2023

Does Microsoft have an SMTP server? ›

While the Office 365 SMTP server lets you send emails using Office 365, IMAP and POP3 let you receive emails that have been sent to your Microsoft 365 email account.

How do I enable SMTP on Microsoft? ›

Enable SMTP for Microsoft accounts (directly from Microsoft)
  1. Log in to your Microsoft Admin center.
  2. Open "Active Users"
  3. In the side window, click on "Mail" tab, and then on "Manage email apps"
  4. Check the "Authenticated SMTP" box and make sure IMAP is checked too.
  5. Save changes.

Can Azure send emails? ›

To send an email message, you need to: Create an SmtpClient using the Azure Communication Services host Url and the Smtp Authentication credentials. Create a MailMessage. Send using the SmtpClient's Send method.

How to install Azure communication email? ›

You need an Azure subscription, a Communication Service Resource, and an Email Communication Resource with an active Domain. To create these resource, you can use the Azure Portal, the Azure PowerShell, or the . NET management client library.

Can Azure send email notification? ›

You can send email notifications to individuals or to all users with specific Azure roles.

Can Azure Devops send emails? ›

You can send an email to all collections in an application tier. See Configure an SMTP server and customize email for alerts and feedback requests. Also, you can generate a banner with the az devops banner command that all users see when they sign in.

How do I send an email from Azure pipeline? ›

Create the email workflow in your logic app

Create a Standard logic app workflow named SendEmailFromPipeline . Add the Request trigger named When an HTTP request is received , and add the Office 365 Outlook action named Send an email (V2) .

How do I send email permissions in Azure? ›

Choose Application permissions , search for Mail in the search area, then check Mail. Send permission from the list and add permission using the Add Permissions button. Provide admin consent for Mail.

Top Articles
Latest Posts
Article information

Author: Maia Crooks Jr

Last Updated:

Views: 6027

Rating: 4.2 / 5 (63 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Maia Crooks Jr

Birthday: 1997-09-21

Address: 93119 Joseph Street, Peggyfurt, NC 11582

Phone: +2983088926881

Job: Principal Design Liaison

Hobby: Web surfing, Skiing, role-playing games, Sketching, Polo, Sewing, Genealogy

Introduction: My name is Maia Crooks Jr, I am a homely, joyous, shiny, successful, hilarious, thoughtful, joyous person who loves writing and wants to share my knowledge and understanding with you.