API Not found when registering M2M Application

Problem statement

Currently, we have observed an issue where, if we have more than 100 APIs, only the first page of 100 is available to search when registering an API to an M2M application.

Cause

  • This is a known issue and has been backlogged for fixing.
  • This happens when there are more than 100 APIs to search through.

Solution

We recommend using the Management API to associate the API and the Client together.

Take for example, if the M2M application is not created yet, you’ll need to first create the application with a payload like the example below using the Management API’s Create a client endpoint.

{
  "name": "AppName",
  "app_type":"non_interactive"
}

If additional changes are still needed after creation, they can be done in the Auth0 Dashboard or with the Management API’s Update a client endpoint.

Once you have created your M2M application, you can then associate it with your API using the Management API’s Create client grant endpoint.

To correctly format the requests, you can make a call to the Management API’s Get client grants endpoint to see a sample of an existing client grant. You will need to include the client_id of the application you are updating, the audience identifier of the API, and, the array of scopes you want to be associated.

If needed, you can update the scopes granted to your M2M application in the Auth0 Dashboard or using the Management API’s Update a client grant endpoint.