"Missing authentication" error when trying to connect with Management API

Hi,

In the last couple of hours we started getting “Missing authentication” when connecting from our Node.js app to auth0.

We are connecting using:

const mangement = new auth0.ManagementClient({
               domain: "ourdomain",
               clientId: "our clientId",
               clientSecret: "our client secret"
});
mangement.getUsersByEmail("user@example.com);

According to the docs this should work.

Thanks,
Ofer

Seems like this authentication method has stopped working, if we use AuthenticationClient it’s working

var auth0 = new AuthenticationClient({
    domain: "ourdomain",
           clientId: "our clientId",
           clientSecret: "our client secret"
});

auth0.clientCredentialsGrant(
    {
        audience: 'https://our_account.auth0.com/api/v2/'
    },
    function (err, response) {
        if (err) {
            console.log("error in grant credentials", err);
       }
         const mangement = new ManagementClient({
              domain: "my domain",
              token: response.access_token
        });

       mangement.getUsersByEmail("user@example.com")
            .then(user => console.log(JSON.stringify(user)))
            .catch(err2 => console.log("error", err2));
        }
 );

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.