We're experiencing difficulty. Our engineers are on it. Please check status.mailgun.com for real-time updates.

SAML Overview & General Configuration

Table Of Contents
Quick Overview
General Configuration
    Verify The SAML Domain
    Enabling SAML SSO
    Disabling SAML SSO
SAML Setup Guides
Got Questions?

Quick Overview

Note: SAML SSO is available on Scale and higher plans (i.e. Contract and Enterprise). See our plan comparison here.

Using the SAML 2.0 protocol, Mailgun allows you to integrate with your Identity Provider to authenticate users via single sign-on, also known as SSO. Theoretically, as long as your current Identity Provider supports the SAML 2.0 protocol (Okta, Auth0, Onelogin, Azure AD, etc), then you should be able to use your provider with Mailgun. 

Mailgun supports just-in-time (JiT) provisioning, so that when a user logs into Mailgun using our SSO integration, that user automatically becomes a user under your Mailgun account.

In short, this setup process requires the exchange of information between the two systems:

  • Provide Mailgun With The Information Below From Your Identity Provider
    • IdP Entity ID (also known as Identity Provider Issuer)
    • Single Sign-on URL
    • X509 Certificate
  • Provide Your Identity Provider With The Information Below From Mailgun
    • Entity ID
    • Assertion Consumer Service URL
    • Single Logout Service URL

^ Top Of Page

 

General Configuration

Verify The SAML Domain

In order to set up SAML, you will need to verify that you own your corporate domain (the domain to be configured with SAML login). There are two methods for verifying your domain on the Mailgun platform:

  • Verified sending domain - If the domain you wish to configure with SAML is already a verified sending domain on your account, no further action is required for this bullet point. Otherwise, you will need to add the domain and configure the SPF and DKIM records to verify the domain. This domain must match the FQDN in the corporate email addresses that will be used to authenticate using SAML.
  • TXT record - Mailgun can generate a unique TXT record for you to add to your domain’s DNS that will allow us to verify you own this domain. In order to use this method:
    • Navigate to the SAML Configuration settings page (see the "Enabling SAML SSO" section below)
    • Enter your domain in the Domain Name field under the Domain TXT Record Generation section
    • Click the Generate button
    • Finally, copy the TXT record from the modal, and add it to your DNS hosting provider for your domain.

Screen Shot 2022-11-08 at 3.45.12 PM.png          Screen Shot 2022-11-08 at 3.45.36 PM.png

Enabling SAML SSO

Note: Only Admin users have access to enable/disable SAML on an account.

As for enabling SAML SSO, we'll show you how to do this below:

  1. First, log in to the Mailgun Control Panel (if you have not already done so).
  2. Then, at the top-right corner of the page, click the Profile drop-down menu to expand its list of options.
  3. Next, click the Account option. Alternatively, you can use this direct link
  4. On the resulting page and in the Authentication section, click the Setup button for the SAML Auth setting.

Screen Shot 2022-11-08 at 3.46.23 PM.png

Once there, you will find the relevant SAML Provider (SP) Details [i.e. Mailgun details that you provide to your Identity Provider], as well as the Identity Provider (IdP) Details [i.e. Identity Provider details that you provide to Mailgun]. This article goes over the specific information and additional steps needed in the relevant Identity Provider sections (i.e. Okta, Azure, OneLogin, etc.). You will also have the option to Manage Custom Configuration , which allows you to set your User Name Attribute Settings. 

Screen Shot 2022-11-08 at 3.23.12 PM.png Screen

Disabling SAML SSO

Note: Only Admin users have access to enable/disable SAML on an account.

As for disabling SAML SSO, we'll show you how to do this below:

  1. First, log in to the Mailgun Control Panel (if you have not already done so).
  2. Then, at the top-right corner of the page, click the Profile drop-down menu to expand its list of options.
  3. Next, click the Account option. Alternatively, you can use this direct link
  4. On the resulting page and in the Authentication section, and by the SAML Auth setting, click the Disable button.

Screen Shot 2022-11-08 at 3.45.59 PM.png

Of Special Note: 

^ Top Of Page

 

SAML Setup Guides

Once SAML has been enabled within the Mailgun Control Panel (as detailed in the above section), you may begin the process of connecting your Identity Provider to Mailgun. For reference, please use one of the available setup guides linked below:

^ Top Of Page

 

Got Questions?

Sinch Mailgun has answers! If you have any concerns or questions, please send us a Support ticket using the Support page within your Mailgun Control Panel.  Our Support Team will be happy to assist!

^ Top Of Page