Connect your app to ADFS

First, provide this information to your ADFS administrator:

  • Realm Identifier: urn:auth0:YOUR_TENANT
  • Endpoint: https://YOUR_DOMAIN/login/callback (or, if you are using the custom domains feature, https://<YOUR CUSTOM DOMAIN>/login/callback)

If you want to use the /oauth/ro endpoint you must enable /adfs/services/trust/13/usernamemixed.

Federation Metadata

The Federation Metadata file contains information about the ADFS server's certificates. If the Federation Metadata endpoint (/FederationMetadata/2007-06/FederationMetadata.xml) is enabled in ADFS, Auth0 can periodically (once a day) look for changes in the configuration, like a new signing certificate added to prepare for a rollover. Because of this, enabling the Federation Metadata endpoint is preferred to providing a standalone metadata file. If you provide a standalone metadata file, we will notify you via email when the certificates are close to their expiration date.

Scripted setup

For automated integration, this script uses the ADFS PowerShell SnapIn to create and configure a Relying Party that will issue, for the authenticated user, the following claims: email, upn, given name and surname.

If you are using the custom domains feature, you will need to replace the last URL in the above script with https://<YOUR CUSTOM DOMAIN>/login/callback.

Copy and paste the script above into the Windows PowerShell window.

You must run this script as an administrator of your system.

What the script does

1. Creates the Relying Party on ADFS

The script creates the relying party on ADFS, as follows:

If you are using the custom domains feature, you will need to replace the $webAppEndpoint value with https://<YOUR CUSTOM DOMAIN>/login/callback.

2. Creates rules to output common attributes

The script also creates rules to output the most common attributes, such as email, UPN, given name, or surname:

Manual setup

If you don't feel comfortable executing the script, you can follow these manual steps:

  1. Open the ADFS Management Console.

  2. Click on Add Relying Party Trust.

  3. Click Start on the first step.

  4. Select Enter data about the relying party manually and click Next.

  5. Enter an arbitrary name (such as "YOUR_APP_NAME") and click Next.

  6. Leave the default selection (ADFS 2.0 profile) and click Next.

  7. Leave the default (no encryption certificate) and click Next.

  8. Check Enable support for the WS-Federation..., enter the following value in the textbox and click Next.


    If you are using the custom domains feature, use the following URL format instead: https://<YOUR CUSTOM DOMAIN>/login/callback.

  9. Add a Relying party trust identifier with the following value and click Add and then Next.


  10. Leave the default option (Permit all users...) and click Next.

  11. Click Next and then Close. The UI will show a new window to edit the Claim Rules.

  12. Click on Add Rule....

  13. Leave the default option (Send LDAP Attributes as Claims).

  14. Give the rule an arbitrary name that describes what it does. For example:

    Map ActiveDirectory attributes (mail -> Mail, displayName -> Name, userPrincipalName -> NameID, givenName -> GiveName, sn -> Surname)

  15. Select the mappings as shown in this image and click Finish.

  16. (Optional) Adding additional LDAP attributes

The mappings created on step 15 are the most commonly used, but if you need additional LDAP attributes with information about the user, you can add more claim mappings.

If you already closed the window on the previous step, select Edit Claim Rules on the context menu for the Relying Party Trust you created, and edit the rule from step 14).

Create a row for every additional LDAP attribute you need, choosing the attribute name on the left column and desired claim type on the right column.

If the claim type you are looking for doesn't exist, you have two options:

  • Type a namespace-qualified name for the new claim (for example
  • Register a new claim type (under AD FS | Services | Claim Descriptions) on the ADFS admin console), and use the claim name in the mapping.

Auth0 will use the name part of the claim type (for example department in as the attribute name for the user profile.

Next Steps

Now that you have a working connection, the next step is to configure your application to use it. You can follow our step-by-step quickstarts or use directly our libraries and API.