Skip to main content

Auth0 SAML

Appcircle supports Auth0 as OpenID or as a SAML provider.

info

Only Enterprise accounts support SSO.

Enable SSO

SSO can only be enabled by the organization's administrator. To start, go to My Organization screen and click the Enable Login button under the APPCIRCLE LOGIN section.

Configure Appcircle and Auth0

  • Select Setup SAML SSO Provider
  • Pick an alias and display name for your organization. Please pick a short and rememberable alias.

  • This screen will auto-generate an URL for the next step

  • Login to your Auth0 account and navigate to Applications and then click Create Application.
  • Select Regular Web Applications and give a name
  • Navigate to Addons of the app and enable the SAML option.
  • Click the SAML button and change the settings. For the Callback URL write down the callback URL you have created earlier. For the settings, paste the below JSON
{
"nameIdentifierFormat": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress",
"nameIdentifierProbes": [
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
]
}
  • Instead of writing all the settings of SAML, you can download the settings file from Auth0 and upload it. Navigate to the Usage and then click the Download button to download the XML file
  • Go back to Appcircle, upload this XML file by clicking the button under Import SAML Configuration
  • Check all the settings on this page and confirm that Redirect and SSO URLs are imported correctly. You can check if the X509 Certificate is imported correctly as well. If you want to enter multiple certificates you can separate them by using a comma between them. Please be aware that you need to remove any new lines or file headers from this edit box. This edit box only accepts a long base64 encoded string.

  • The Group Attribute Name and Role Attribute Name fields are optional. Please refer to the SSO Mapping Documentation.

Testing SSO

  • When you connect your Identity Provider, please open a new incognito window and test the SSO integration.
  • Click the Continue with SSO button.
  • Enter the alias you picked.
  • You should first see the below confirmation screen.
  • After you confirmed account linking, you will get an email.
  • You can now access your account with SSO integration when you confirm the email.
  • After you enable the SSO, you can only log in to your account with the SSO link. Your old credentials won't work anymore.
caution

When you connect your Identity Provider, please open a new incognito window and test the SSO integration. Please only log off when you can log in with SSO credentials. If the connection doesn't work, you need to review your settings.

SSO Mapping

This step is optional and can be skipped if you do not plan to use SSO Mapping.

  • Navigate to the User Management section in the Auth0 Dashboard, click on Roles, and create the roles as needed.
  • Navigate to the organization section and create organizations.
  • Add users who will become members of your organization.
  • Click on the three dots and select Assign Roles. Assign the desired roles to users.
  • Navigate to the Connections tab and enable Connections for your organization.
  • Navigate to the "Applications" section. Select the relevant application, then go to the "Organizations" tab. Click on "Disable Grants Now".

Choose "Business Users" for the type of users and select "Prompt for Organization" for the login flow. Click on "Save Changes".

  • To retrieve the groups and roles of a user via tokens, follow these steps:
  1. Navigate to Actions.
  2. Click on the Library tab.
  3. Select Create Action.
  4. Choose Build from Scratch.

The groups claim is already present on the token, but these steps will help you add the roles claim as well.

  • Give an appropriate name to the custom action.
  • Paste following Javascript code and click on the deploy.
exports.onExecutePostLogin = async (event, api) => {
const namespace = 'your_namespace';
if (event.authorization) {
api.idToken.setCustomClaim(`${namespace}roles`, event.authorization.roles);
api.accessToken.setCustomClaim(`${namespace}roles`, event.authorization.roles);
}
}
  • Navigate to Actions and click on the Flows tab.
  • Click on the Login.
  • Drag and drop the custom action created previously.
  • Return to Appcircle, enter Group Attribute Name as http://schemas.auth0.com/org_id and Role Attribute Name as http://schemas.auth0.com/your_namespace_roles. Note that the role claim is created as a custom claim in Auth0 so you must enter the name you determined previously.
caution

The org_id attribute value is equal to the organization ID, not the organization name.