Auth0 "Service not enabled within domain" Error When Using an Audience Parameter

Overview

An Auth0 error occurs when making an API call that specifies an incorrect audience parameter. This happens when setting the audience parameter to a custom domain instead of the default tenant domain when requesting a token for the Management API. Resolve this by configuring the audience parameter to match the Management API identifier displayed in the Auth0 Dashboard.

 

Service not enabled within domain

 

Applies To

  • Auth0
  • API Calls
  • Audience Parameter

Cause

This error occurs when setting the audience parameter to https://<CompanyCustomDomain>/api/v2/ instead of https://<CompanyDefaultTenantDomain>/api/v2/ when requesting a token for the Management API.

Solution

How is the audience parameter configured?

The API identifier for the Management API uses the default tenant domain. Configure the audience parameter to match the Management API identifier displayed in the Auth0 Dashboard by navigating to the APIs section.

  1. Navigate to Applications and choose APIs.
  2. Locate the Management API identifier.
  3. Configure the audience parameter to match the identifier.
    audience: https://<CompanyDefaultTenantDomain>/api/v2/

 

Related References

Recommended content

No recommended content found...