SAML with Other IdPs

This guide covers how to set up SAML federation with identity providers other than Okta — including Microsoft Entra ID (Azure AD), Ping Identity, OneLogin, and any SAML 2.0-compliant IdP. The core concepts are the same regardless of your IdP; only the IdP-side configuration steps differ.

If you're using Okta, see the dedicated SAML with Okta guide instead.

How SAML works with OpenSearch UI

OpenSearch UI doesn't support direct SAML integration the way OpenSearch Dashboards does. Instead, SAML federation goes through one of two AWS intermediaries:

PathFlowBest for
IdP → IDC → OpenSearch UIYour IdP authenticates users, IDC manages the AWS integrationTeams that can enable IAM Identity Center
IdP → SAML IAM Federation → OpenSearch UIYour IdP authenticates users, STS issues temporary credentialsTeams that can't use IDC

Recommendation: Use the IDC path whenever possible. It provides a better SSO experience, supports SCIM user provisioning, and enables per-user access control.

Path 1: IdP → IDC → OpenSearch UI (recommended)

This path uses your IdP as an external identity source for IAM Identity Center. IDC handles the OpenSearch UI integration.

Generic setup steps

These steps apply to any SAML IdP. The IdP-specific configuration is noted where it differs.

Step 1: Configure your IdP as an external identity source in IDC

  1. Open the IAM Identity Center console 
  2. Go to SettingsIdentity sourceActionsChange identity source
  3. Choose External identity provider
  4. Download the IDC SAML metadata (you'll upload this to your IdP)
  5. Note the ACS URL and Entity ID from the metadata — you'll need these in your IdP

Step 2: Create the SAML application in your IdP

Create a new SAML 2.0 application in your IdP with these settings:

SettingValue
Single sign-on URL (ACS URL)From the IDC metadata downloaded in Step 1
Audience URI / Entity IDFrom the IDC metadata downloaded in Step 1
Name ID formatEmailAddress (recommended)

Step 3: Upload IdP metadata to IDC

  1. Download the SAML metadata XML from your IdP
  2. In the IDC console, upload the metadata file to complete the identity source change

SCIM automatically syncs users and groups from your IdP to IDC:

  1. In IDC SettingsProvisioning, enable automatic provisioning
  2. Copy the SCIM endpoint URL and access token
  3. Configure SCIM in your IdP using the endpoint and token

Step 5: Set up the OpenSearch UI application

Follow the IDC Auth Setup guide starting from Step B (creating the IAM role).

Step 6: Assign users in IDC

  1. In IDC, go to Applications → your OpenSearch UI application
  2. Assign the synced users or groups

Microsoft Entra ID (Azure AD) specifics

Creating the SAML app in Entra ID

  1. In the Azure portal , go to Microsoft Entra IDEnterprise applicationsNew application
  2. Choose Create your own application
  3. Select Integrate any other application you don't find in the gallery (Non-gallery)
  4. Name it (e.g., "OpenSearch UI SSO") and choose Create
  5. Go to Single sign-onSAML
  6. In Basic SAML Configuration:
    • Identifier (Entity ID): Paste the Entity ID from IDC metadata
    • Reply URL (ACS URL): Paste the ACS URL from IDC metadata
  7. Download the Federation Metadata XML — upload this to IDC

SCIM provisioning with Entra ID

  1. In the enterprise application, go to ProvisioningGet started
  2. Set Provisioning Mode to Automatic
  3. Under Admin Credentials:
    • Tenant URL: Paste the SCIM endpoint from IDC
    • Secret Token: Paste the SCIM access token from IDC
  4. Choose Test Connection to verify, then Save
  5. Under Mappings, configure attribute mappings for users and groups
  6. Set Provisioning Status to On

Entra ID attribute mapping

Entra ID attributeMaps toPurpose
user.userprincipalnameName IDUser identifier
user.givennameFirst NameDisplay name
user.surnameLast NameDisplay name
user.mailEmailContact

Ping Identity specifics

Creating the SAML app in PingOne

  1. In the PingOne admin console , go to ConnectionsApplicationsAdd Application
  2. Choose SAML Application
  3. Enter a name (e.g., "OpenSearch UI SSO")
  4. Under SAML Configuration, choose Import Metadata and upload the IDC metadata file
  5. Alternatively, manually configure:
    • ACS URL: From IDC metadata
    • Entity ID: From IDC metadata
    • Name ID Format: EmailAddress
  6. Save and download the PingOne metadata XML — upload this to IDC

SCIM provisioning with PingOne

  1. In the application settings, go to Provisioning
  2. Enable outbound provisioning
  3. Configure the SCIM connection:
    • SCIM URL: Paste the SCIM endpoint from IDC
    • Authentication: Bearer token — paste the SCIM access token
  4. Map user attributes and enable provisioning

OneLogin specifics

Creating the SAML app in OneLogin

  1. In the OneLogin admin portal , go to ApplicationsAdd App
  2. Search for "SAML Custom Connector (Advanced)" and select it
  3. Name it (e.g., "OpenSearch UI SSO") and Save
  4. Go to the Configuration tab:
    • ACS (Consumer) URL: From IDC metadata
    • Audience (Entity ID): From IDC metadata
    • SAML nameID format: Email
  5. Go to the SSO tab and download the Issuer URL metadata — upload this to IDC

SCIM provisioning with OneLogin

  1. In the application, go to Provisioning
  2. Enable provisioning
  3. Configure the SCIM connection with the IDC endpoint and token
  4. Map attributes and save

Path 2: IdP → SAML IAM Federation → OpenSearch UI

Use this path if you can't enable IAM Identity Center. Your IdP federates directly into an IAM role via AWS STS.

Step 1: Create the SAML application in your IdP

Configure a SAML 2.0 application with these AWS-specific settings:

SettingValue
Single sign-on URLhttps://signin.aws.amazon.com/saml
Audience URI / Entity IDurn:amazon:webservices
Name ID formatEmailAddress

Step 2: Configure SAML attribute statements

Add these attribute statements in your IdP's SAML configuration:

Attribute nameValuePurpose
https://aws.amazon.com/SAML/Attributes/RoleSessionNameUser's email or usernameIdentifies the user in AWS CloudTrail logs
https://aws.amazon.com/SAML/Attributes/Role<IAM_ROLE_ARN>,<SAML_PROVIDER_ARN> (comma-separated)Specifies which IAM role to assume

Example Role attribute value:

arn:aws:iam::123456789012:role/OpenSearchUIRole,arn:aws:iam::123456789012:saml-provider/MyIdP

Step 3: Create the SAML identity provider in IAM

Download the metadata XML from your IdP, then create the provider:

aws iam create-saml-provider \
  --saml-metadata-document file://idp-metadata.xml \
  --name MyIdPSAMLProvider

Step 4: Create the IAM role with SAML trust

aws iam create-role \
  --role-name OpenSearchUI-SAML-Role \
  --assume-role-policy-document '{
    "Version": "2012-10-17",
    "Statement": [{
      "Effect": "Allow",
      "Principal": {
        "Federated": "arn:aws:iam::<ACCOUNT_ID>:saml-provider/MyIdPSAMLProvider"
      },
      "Action": "sts:AssumeRoleWithSAML",
      "Condition": {
        "StringEquals": {
          "SAML:aud": "https://signin.aws.amazon.com/saml"
        }
      }
    }]
  }'

Step 5: Attach the OpenSearch UI permission policy

aws iam put-role-policy \
  --role-name OpenSearchUI-SAML-Role \
  --policy-name OpenSearchAppAccess \
  --policy-document '{
    "Version": "2012-10-17",
    "Statement": [{
      "Effect": "Allow",
      "Action": "opensearch:ApplicationAccessAll",
      "Resource": "arn:aws:opensearch:<REGION>:<ACCOUNT_ID>:application/*"
    }]
  }'

Step 6: Access OpenSearch UI

Users access OpenSearch UI through the AWS federated console:

  1. User clicks the app tile in the IdP portal
  2. IdP sends a SAML assertion to AWS
  3. User lands in the AWS Console with the federated role
  4. User navigates to OpenSearch Service → OpenSearch UI → their application

Fine-grained access control with SAML

You can implement per-group access control by mapping IdP groups to different IAM roles. This works with both Path 1 (IDC) and Path 2 (SAML IAM federation).

Approach: Multiple IAM roles

Create separate IAM roles with different permissions for different groups:

IdP groupIAM rolePermissions
opensearch-adminsOpenSearchUI-Admin-RoleFull access to all applications and data sources
opensearch-analystsOpenSearchUI-Analyst-RoleRead-only access to specific applications
opensearch-viewersOpenSearchUI-Viewer-RoleAccess to specific applications, no admin features

In your IdP, configure the SAML Role attribute to map each group to its corresponding IAM role.

Domain-level fine-grained access control

For more granular control at the index level, configure SAML-based fine-grained access control on your OpenSearch domains:

  1. In your IdP, add custom SAML attributes:

    • A subject key attribute (e.g., UserName → user's email) for authentication
    • A roles key attribute (e.g., groups → user's group memberships) for authorization
  2. On the OpenSearch domain, enable IAM Federation and configure the subject key and roles key:

aws opensearch update-domain-config \
  --domain-name <DOMAIN_NAME> \
  --advanced-security-options '{
    "Enabled": true,
    "IAMFederationOptions": {
      "Enabled": true,
      "SubjectKey": "UserName",
      "RolesKey": "groups"
    }
  }'
  1. Map IdP groups to OpenSearch security roles using backend roles mapping.

Common issues across all IdPs

IssueCauseResolution
SAML assertion errors after IdP loginAttribute mapping mismatchVerify that RoleSessionName and Role attributes match the expected format exactly
"Access denied" after successful federationIAM role missing opensearch:ApplicationAccessAllAdd the permission policy to the federated role
Users land on AWS Console instead of OpenSearch UIDefault Relay State not configuredSet the Relay State in your IdP to the OpenSearch UI redirect URL
SCIM sync not workingWrong endpoint or expired tokenVerify the SCIM endpoint URL and regenerate the access token in IDC
Users synced but can't access the appUsers not assigned to the IDC applicationAssign users/groups in IDC → Applications → your app
Multiple IdP groups but all users get same permissionsAll groups mapped to the same IAM roleCreate separate IAM roles for each group and update the SAML Role attribute mapping
IdP metadata expiredSAML certificates have a limited validity periodDownload fresh metadata from your IdP and update the IAM SAML provider or IDC identity source

IdP-specific documentation links

Identity providerSAML setup docsSCIM provisioning docs
Microsoft Entra ID (Azure AD)Azure AD SAML SSO Azure AD SCIM provisioning 
Ping IdentityPingOne SAML PingOne SCIM 
OneLoginOneLogin SAML OneLogin SCIM 

Related