# 404 Not Found response from the Management API

**URL:** <https://community.auth0.com/t/404-not-found-response-from-the-management-api/109824>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [June 22, 2023, 11:38pm UTC](https://community.auth0.com/t/404-not-found-response-from-the-management-api/109824 "2023-06-22T23:38:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![heberr1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@heberr1](https://community.auth0.com/u/heberr1)\
**Post date:** [June 22, 2023, 11:38pm UTC](https://community.auth0.com/t/404-not-found-response-from-the-management-api/109824/1 "2023-06-22T23:38:39Z")

</div>

Hi There,

Been trying to get some Management API calls to work, but I keep getting the following error:

“Server returned: 404 Not Found”

I am trying to update a user with the following link:

[https://dev-p2gisi3l38iiryqg.us.auth0.com/api/v2/users/auth0|6494bb02f1ac1401362d9cca](https://dev-p2gisi3l38iiryqg.us.auth0.com/api/v2/users/auth0%7C6494bb02f1ac1401362d9cca)

Sending the following data:

{ “given\_name”: “Hebster”, “family\_name”: “Reynolds”, “name”: “Hebster Reynolds” }

And I keep getting the following response:

Server returned: 404 Not Found

Not sure if my post values are even getting passed to the link. I’ve sent the token, and all requested json details. Not sure how to fix.

Any suggestions on where I should look to correct the error?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [June 23, 2023, 1:00am UTC](https://community.auth0.com/t/404-not-found-response-from-the-management-api/109824/2 "2023-06-23T01:00:45Z")

</div>

Hi @heberr1,

Welcome to the Auth0 Community!

I have just checked your tenant logs and it seems that you were able to successfully update the user. I couldn’t find any logs indicating a failed event.

However, I have attached a code snippet that worked for me to update a user using the Management API. Could you please give it a try and see if it works for you?

```auto
const axios = require('axios');
let data = JSON.stringify({
  "email": "test-user@example.com",
  "given_name": "test-given-name",
  "family_name": "test-family-name",
  "name": "test-name"
});

let config = {
  method: 'patch',
  maxBodyLength: Infinity,
  url: 'https://YOUR_DOMAIN.REGION.auth0.com/api/v2/users/{USER_ID}',
  headers: { 
    'Authorization': 'Bearer {YOUR_MANAGEMENT_API_TOKEN}', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

If you are still encountering issues, could you please share the exact steps and code you used?

I look forward to your update.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![heberr1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@heberr1](https://community.auth0.com/u/heberr1)\
**Post date:** [June 23, 2023, 2:04am UTC](https://community.auth0.com/t/404-not-found-response-from-the-management-api/109824/3 "2023-06-23T02:04:07Z")

</div>

Hi Rueben,

Thank you for your quick response. Same error message.

Here is the link I am testing with:

[https://register.theaub.org/updateuser.asp](https://register.theaub.org/updateuser.asp)

I am using classic asp as far as coding is concerned. I can see that your code is JavaScript maybe I should switch to JavaScript for this purpose.

Below is a code I am using right now:

\<%  
Function CreateJSon()

```
	Set oJSON = New aspJSON

	With oJSON.data
		.Add "email", "hebster@msn.com"
		.Add "given_name", "Hebster"
		.Add "family_name", "Reynolds"
		.Add "name", "Hebster Reynolds"
	End With

	CreateJSon = oJSON.JSONoutput() 'Return json string

```

End Function

'---- Update User —

Dim http: Set http = Server.CreateObject(“WinHttp.WinHttpRequest.5.1”)

Dim url: url = “[https://dev-p2gisi3l38iiryqg.us.auth0.com/api/v2/users/](https://dev-p2gisi3l38iiryqg.us.auth0.com/api/v2/users/) {USER\_ID}”  
Dim data: data = CreateJSon()

With http  
Call .Open(“POST”, url, False)  
Call .SetRequestHeader(“Authorization”, “Bearer {YOUR\_MANAGEMENT\_API\_TOKEN}”)  
Call .SetRequestHeader(“Content-Type”, “application/json”)  
Call .Send(data)  
End With

Response.write “  
url=” & url & “  
”  
Response.write “  
Data=” & data & “  
”  
Response.write “  
http.Status=” & http.Status & “  
”

If Left(http.Status, 1) = 2 Then  
'Request succeeded with a HTTP 2xx response, do something…  
Else  
'Output error  
Call Response.Write("Server returned: " & http.Status & " " & http.StatusText)  
End If

%\>

Thank again for your response.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 7, 2023, 2:04am UTC](https://community.auth0.com/t/404-not-found-response-from-the-management-api/109824/4 "2023-07-07T02:04:34Z")

</div>

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