Azure (Microsoft Entra)
Overview
This guide walks you through configuring SAML-based Single Sign-On (SSO) between Azure Active Directory (Microsoft Entra) and Mailtrap.
Configure Single Sign-On with Azure
Create an Enterprise application
Open your Azure Active Directory and select Enterprise applications
Add a new application by clicking the + New application button

Choose + Create your own application, enter the name of the application (e.g., "Mailtrap"), and select Integrate any other application you don't find in the gallery (Non-gallery)

Set up Single Sign-On
After the application has been created, you can set up single sign-on:
Choose Set up single sign-on in the Getting Started section

For Single Sign-on mode, select SAML based Sign-on

Follow the steps on the SSO with SAML screen. Azure AD has a detailed configuration guide at the top of the page for further guidance.
Basic SAML configuration
Click edit in the dropdown menu and provide the following SAML Provider details to your Azure from Mailtrap:
Entity ID → Identifier (Entity ID)
Assertion Consumer Service URL → Reply URL (Assertion Consumer Service URL)
Single Logout Service URL → Logout URL

User attributes and claims
In the User Identifier field, enter user.mail.
SAML signing certificate
Click Edit and choose SHA-1 Signing Algorithm
Click Save

Download Certificate (Base64)
Open it in any text editor and copy its content
Paste the certificate content into the Mailtrap X509 Certificate field
Identity provider details
Provide the following to Mailtrap from Azure:
IdP Entity ID (Identity Provider Issuer) → Azure AD Identifier
Single Sign-on URL → Login URL
Optional: Single Logout Service (SLO) URL → Logout URL

Now you can save your SAML configuration on Mailtrap.
Assign Users and Groups
With SAML configuration complete, you need to add users or groups to your application in Azure:
Click Users and groups on the left sidebar
Click on + Add User → Users and Groups
Select all users you want to add to the application and click Select
Permissions
By default, we create users with no permissions. If you want the user to be automatically assigned to Account Admin or Account Viewer role, you need to set up the role mapping.
Configure role mapping in Mailtrap
In the following example, we assign the roles depending on the title attribute value:

Configure attributes in Azure
Navigate to Attributes & Claims

Click Add new claim

Add the title claim with the appropriate source attribute (e.g., user.jobtitle)

Click Save
Your Azure SSO configuration with role mapping is now complete.
Last updated
Was this helpful?

