Auth0 Service Not Enabled Within Domain Error When Using an Audience Parameter

Overview

This article explains the cause of the following error, which occurs when making an API call that specifies an incorrect audience parameter.

 

Service not enabled within domain

 

Applies To
  • API Calls
  • Audience Parameter 
Cause

This error is caused by setting the audience parameter to https://{yourCustomDomain}/api/v2/ instead of https://{yourDefaultTenantDomain}/api/v2/ when requesting a token for the Management APIv2. 

Solution

The API identifier for the Management APIv2 uses the default tenant domain. To resolve this error, configure the audience parameter to match the Management APIv2 identifier displayed in the Dashboard under Applications > APIs.

 

For example:

audience: https://{yourDefaultTenantDomain}/api/v2/

 

Recommended content

No recommended content found...