Error: The Connection Strategy waad Is Not Supported for This Operation

Overview

This article provides a solution for an error that occurs when using the api.authentication.setUserByConnection() method with a native Microsoft Azure Active Directory (AD) enterprise connection during a Custom Token Exchange.

The connection strategy waad is not supported for this operation

Applies To

  • Custom Token Exchange
  • Actions
  • Enterprise Connections
  • Microsoft Azure AD

Cause

The api.authentication.setUserByConnection() function does not support the native Microsoft Azure AD enterprise connection, which uses the internal strategy name waad. The supported "Active Directory" strategy refers to the on-premise Active Directory/Lightweight Directory Access Protocol (LDAP) connector, which uses the strategy name ad, and not the waad cloud integration.

Solution

To resolve this error, reconfigure the integration with Azure AD using a connection strategy compatible with the Custom Token Exchange feature. Instead of the native Microsoft Azure AD connection, use one of the following generic enterprise connection types:

  • OpenID Connect (OIDC)
  • Security Assertion Markup Language (SAML)

Follow these steps to create a new connection:

  1. In the Auth0 Dashboard, go to Authentication > Enterprise.
  2. Click Create Connection.
  3. Select either OpenID Connect or SAML as the connection type. Configure the new connection with the details from the Azure AD tenant. 

    For detailed guidance on configuring an OpenID Connect enterprise connection, refer to Connect to OpenID Connect Identity Provider or the community article Connect to Azure AD using an OIDC Enterprise Connection.

    For detailed guidance on configuring a SAML enterprise connection, refer to Connect Your App to SAML Identity Providers or the video guide Set Up Azure AD as a SAML Enterprise Connection in Auth0.
  4. Update the relevant Auth0 Action to use the new OIDC or SAML-based connection in the api.authentication.setUserByConnection() call.

Recommended content

No recommended content found...