Azure SAML Implementation

This article contains Azure-specific help for configuring Login with SSO via SAML 2.0. For help configuring login with SSO for another IdP, refer to SAML 2.0 Configuration.

Configuration involves working simultaneously with the Bitwarden web vault and the Azure Portal. As you proceed, we recommend having both readily available and completing steps in the order they are documented.

Tipp

Already an SSO expert? Skip the instructions in this article and download screenshots of sample configurations to compare against your own.

Download Sample

Open SSO in the web vault

Navigate to your organization's SettingsSingle Sign-On screen:

SAML 2.0 Configuration
SAML 2.0 Configuration

If you haven't already, create a unique SSO Identifier for your organization. Otherwise, you don't need to edit anything on this screen yet, but keep it open for easy reference.

Tipp

If you are self-hosting Bitwarden, you can use alternative Member Decryption Options. This feature is disabled by default, so continue with Master Password decryption for now and learn how to get started using Key Connector once your configuration is complete and successfully working.

Create an enterprise application

In the Azure Portal, navigate to Azure Active Directory and select Enterprise applications from the navigation menu:

Enterprise applications
Enterprise applications

Select the New application button:

Create new application
Create new application

On the Browse Azure AD Gallery screen, select the Create your own application button:

Create your own application
Create your own application

On the Create your own application screen, give the application a unique, Bitwarden-specific name and select the Create button.

Enable single sign-on

From the Application Overview screen, select Single sign-on from the navigation:

Configure Single sign-on
Configure Single sign-on

On the Single Sign-On screen, select SAML.

SAML setup

Basic SAML configuration

Select the Edit button and configure the following fields:

Field Description
Identifier (Entity ID) Set this field to the pre-generated SP Entity ID retrieved from the Bitwarden SSO Configuration screen.

For cloud-hosted customers, this is always https://sso.bitwarden.com/saml2. For self-hosted instances, this is determined by your configured server URL, for example https://your.domain.com/sso/saml2.
Reply URL (Assertion Consumer Service URL) Set this field to the pre-generated Assertion Consumer Service (ACS) URL retreived from the Bitwarden SSO configuration screen.

For cloud-hosted customers, this is always https://sso.bitwarden.com/saml2/your-org-id/Acs. For self-hosted instances, this is determined by your configured server URL, for example https://your.domain/sso/your-org-id/Acs.
Sign on URL Set this field to the login URL from which users will access Bitwarden.

For cloud-hosted customers, this is always https://vault.bitwarden.com/#/sso. For self-hosted instances, this is determined by you configured server URL, for example https://your-domain.com/#/sso.

User attributes & claims

The default claims constructed by Azure will work with login with SSO, however you can optionally use this section to configure the NameID format used by Azure in SAML responses.

Select the Edit button and select the Unique User Identifier (Name ID) entry to edit the NameID claim:

Edit NameID Claim
Edit NameID Claim

Options include Default, Email Address, Persistent, Unspecified, and Windows qualified domain name. For more information, refer to Microsoft Azure documentation.

SAML signing certificate

Download the Base64 Certificate for use during a later step.

Set up your application

Copy or take note of the Login URL and Azure AD Identifier in this section for use during a later step:

Azure URLs
Azure URLs

Users and groups

Select Users and groups from the navigation:

Assign users or groups
Assign users or groups

Select the Add user/group button to assign access to the login with SSO application on a user or group-level.

Back to the web vault

At this point, you have configured everything you need within the context of the Azure Portal. Return to the Bitwarden web vault to complete configuration.

The Single Sign-On screen separates configuration into two sections:

  • SAML Service Provider Configuration will determine the format of SAML requests.

  • SAML Identity Provider Configuration will determine the format to expect for SAML responses.

Service provider configuration

Configure the following fields:

Field Description
Name ID Format By default, Azure will use email address. If you changed this setting, select the corresponding value. Otherwise, set this field to Unspecified or Email Address.
Outbound Signing Algorithm The algorithm Bitwarden will use to sign SAML requests.
Signing Behavior Whether/when SAML requests will be signed.
Minimum Incoming Signing Algorithm By default, Azure will sign with RSA SHA-256. Select rsa-sha256 from the dropdown.
Want Assertions Signed Whether Bitwarden expects SAML assertions to be signed.
Validate Certificates Check this box when using trusted and valid certificates from your IdP through a trusted CA. Self-signed certificates may fail unless proper trust chains are configured with the Bitwarden login with SSO docker image.

When you are done with the service provider configuration, Save your work.

Identity provider configuration

Identity provider configuration will often require you to refer back to the Azure Portal to retrieve application values:

Field Description
Entity ID Enter your Azure AD Identifier, retrieved from the Azure Portal's Set up your application section. This field is case sensitive.
Binding Type Set to HTTP POST or Redirect.
Single Sign On Service URL Enter your Login URL, retrieved from the Azure Portal's Set up your application section.
Single Log Out Service URL Login with SSO currently does not support SLO. This option is planned for future development, however you may preconfigure it with your Logout URL if you wish.
X509 Public Certificate Paste the downloaded certificate, removing -----BEGIN CERTIFICATE----- and -----END CERTIFICATE-----.

The certificate value is case sensitive, extra spaces, carriage returns, and other extraneous characters will cause certificate validation to fail.
Outbound Signing Algorithm By default, Azure will sign with RSA SHA-256. Select rsa-sha256 from the dropdown.
Disable Outbound Logout Requests Login with SSO currently does not support SLO. This option is planned for future development.
Want Authentication Requests Signed Whether Azure expects SAML requests to be signed.

When you are done with the identity provider configuration, Save your work.

Tipp

You can require users to log in with SSO by activating the single sign-on authentication policy. Please note, this will require activating the single organization policy as well. Learn more.

Test the configuration

Once your configuration is complete, test it by navigating to https://vault.bitwarden.com, entering your email address, selecting Continue, and selecting the Enterprise Single-On button:

Enterprise single sign on and master password
Enterprise single sign on and master password

Enter the configured organization identifier and select Log In. If your implementation is successfully configured, you will be redirected to the Microsoft login screen:

Azure login screen
Azure login screen

After you authenticate with your Azure credentials, enter your Bitwarden master password to decrypt your vault!


Sprache
© 2022 Bitwarden, Inc.
NutzungsbedingungenDatenschutzerklärungSitemap