> This page location: /docs.md > /docs/management.md > /docs/atlas/management/organizations/organization-security.md > /docs/atlas/security/federated-authentication.md

> For the complete MongoDB documentation index, see www.mongodb.com/docs/llms.txt

# Manage Organization Mapping for Federated Authentication

When you map organizations to your Identity Provider, Atlas grants users who authenticate through the IdP (Identity Provider) membership in the selected organizations. You can give these users a default [role](https://www.mongodb.com/docs/atlas/reference/user-roles.md#std-label-organization-roles) in the mapped organizations. Organization mapping lets you configure a single IdP (Identity Provider) to grant users access to multiple Atlas organizations.

Only users whose email addresses use a [mapped domain](https://www.mongodb.com/docs/atlas/security/manage-domain-mapping.md#std-label-atlas-manage-fed-domain-map) can authenticate through the IdP (Identity Provider). These users can then gain membership in the mapped organizations. Atlas denies access to users on unmapped domains, even if the IdP (Identity Provider) authenticates them.

You can apply the same IdP (Identity Provider) to multiple organizations. You can assign each organization a single IdP (Identity Provider).

**Note:**

If you are configuring federated authentication for a Workforce, note that Atlas supports a maximum of two Workforce IdPs connected to an organization: one OIDC IdP (for database access) and one SAML IdP (for UI access).

## Required Access

To manage federated authentication, you must have [`Organization Owner`](https://www.mongodb.com/docs/atlas/reference/user-roles.md#mongodb-authrole-Organization-Owner) access to one or more organizations that are delegating federation settings to the instance.

## Prerequisites

To complete this tutorial, you must have already linked an IdP (Identity Provider) to Atlas and mapped one or more domains to that IdP (Identity Provider). For instructions on these procedures, see:

- [Manage Identity Providers](https://www.mongodb.com/docs/atlas/security/manage-federated-auth.md#std-label-atlas-manage-fed-auth)

- [Manage Domain Mapping for Federated Authentication](https://www.mongodb.com/docs/atlas/security/manage-domain-mapping.md#std-label-atlas-manage-fed-domain-map)

## Map an Organization to Your Identity Provider

**Note:**

Atlas creates an [`Organization's IdP certificate is about to expire`](https://www.mongodb.com/docs/atlas/reference/alert-conditions.md#mongodb-alert-Organization-s-IdP-certificate-is-about-to-expire) alert automatically when you map an organization to an IdP (Identity Provider) provider. If you remove the mapping, Atlas deletes all instances of this alert.

1. In Atlas, go to the Federation Management console for your organization.

   If it's not already displayed, select your desired organization from the  Organizations menu in the navigation bar.

   In the sidebar, click Federation under the Identity & Access heading.

   Click Open Federation Management App.

   The [Federation](https://cloud.mongodb.com/go?l=https%3A%2F%2Fcloud.mongodb.com%2Fv2%23%2Forg%2F%3Corganization%3E%2Ffederation) page displays.

2. Connect an organization to the Federation Application.

   Click Link Organizations.

   Atlas displays all organizations where you are an [`Organization Owner`.](https://www.mongodb.com/docs/atlas/reference/user-roles.md#mongodb-authrole-Organization-Owner)

   Organizations which are not already connected to the Federation Application have Configure Access button in the Actions column.

   Click the desired organization's Configure Access button.

3. Apply an Identity Provider to the organization.

   On the Identity Provider screen, click Connect Identity Provider.

   Atlas directs you to the Identity Providers screen which shows all IdPs (Identity Providers) you have linked to Atlas.

   For the IdP (Identity Provider) you want to apply to the organization, click Connect.

   In the Apply Identity Provider to Organizations modal, select the organizations to which this IdP (Identity Provider) applies.

   Click Confirm.

4. Connect an organization to the Federation Application.

   Click Linked Organizations in the left navigation.

   In the list of Organizations, ensure that your desired organizations now have the expected Identity Provider.

## Change an Organization's Mapped Identity Provider

Reconfigure your IdP (Identity Provider) to change the organizations to which it's mapped.

1. Unmap the current Identity Provider.

   In Atlas, go to the Federation Management console for your organization.

   If it's not already displayed, select your desired organization from the  Organizations menu in the navigation bar.

   In the sidebar, click Federation under the Identity & Access heading.

   Click Open Federation Management App.

   The [Federation](https://cloud.mongodb.com/go?l=https%3A%2F%2Fcloud.mongodb.com%2Fv2%23%2Forg%2F%3Corganization%3E%2Ffederation) page displays.

   In the sidebar, click Organizations.

   Click the Organization whose IdP (Identity Provider) you wish to change.

   Click Manage for the IdP (Identity Provider) which is currently mapped to the organization.

   Click Disconnect Identity Provider and confirm.

2. Map the new Identity Provider.

   On the same Organization page, click Connect Identity
   Provider(s).

   Select the organization.

   Click Connect.

## *(Optional)* Configure Advanced Options for Your Organization

The following optional settings provide even greater control over user management and authentication in your organization.

### Assign a Default User Role for Your Organization

You can assign users who authenticate through the IdP (Identity Provider) a default [role](https://www.mongodb.com/docs/atlas/reference/user-roles.md#std-label-organization-roles) in a mapped organization. Configuring this option ensures that users who authenticate through your IdP (Identity Provider) have the same set of permissions. This setting is not required for organization mapping.

For instructions on assigning a default role, see [Assign a Default User Role for an Organization.](https://www.mongodb.com/docs/atlas/security/federation-advanced-options.md#std-label-advanced-option-default-role)

**Note:**

The selected default role only applies to users who authenticate through the IdP (Identity Provider) if they do not have an Atlas role mapped to the IdP (Identity Provider) group already.

### Restrict Access to an Organization by Domain

You can restrict access to your organization to an approved list of domains. This allows you to set the domains from which organization users can login without needing to directly map those domains to your IdP (Identity Provider).

For instructions on restricting access by domain, see [Restrict Access to an Organization by Domain.](https://www.mongodb.com/docs/atlas/security/federation-advanced-options.md#std-label-restrict-org-access-by-domain)

## Disconnect an Organization from the Federation Application

When you disconnect an organization from the Federation Application, Atlas no longer grants membership or a default [organization role](https://www.mongodb.com/docs/atlas/reference/user-roles.md#std-label-organization-roles) to users who authenticate through the IdP (Identity Provider).

From the Federation Management Console:

1. Go to the Linked Organizations page.

   In Atlas, go to the Federation Management console for your organization.

   If it's not already displayed, select your desired organization from the  Organizations menu in the navigation bar.

   In the sidebar, click Federation under the Identity & Access heading.

   Click Open Federation Management App.

   The [Federation](https://cloud.mongodb.com/go?l=https%3A%2F%2Fcloud.mongodb.com%2Fv2%23%2Forg%2F%3Corganization%3E%2Ffederation) page displays.

   Click Organizations.

2. Open the Actions dropdown for the organization you want to disconnect.

3. Click Disconnect.

4. Click Confirm.
