Hello everyone,
I’ve been trying to patch users through the api:
/api/v2/users/{id}
However I get a response with content:
error message: You cannot update the following fields
error: insufficient_scope
After a bit of research (and i mean a lot) I figured out that the token that i was supposed to send to that API is a management token, therefore I created a machine to machine app utilizing the Auth0 Management API (and yes I’ve checked the box for authorize) and followed the code snipped provided by auth0 on the quickstart of the app:
var client = new RestClient(“https://dev-glx966xm.us.auth0.com/oauth/token”);
var request = new RestRequest(Method.POST);
request.AddHeader(“content-type”, “application/json”);
request.AddParameter(“application/json”, "{"client_id":"client_id","client_secret":"client_secret","audience":"https://dev-glx966xm.us.auth0.com/api/v2/\“,\“grant_type\”:\“client_credentials\”}”, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Im sure the client id and client secret are correct, however this request returns the following response:
“error”: “access_denied”,
“error_description”: “Unauthorized”
Does anyone have any idea of what could be the problem that prevents me from receiving the management access_token?