Hey @dpatel
You need to pass the whole Auth0 user_id to the Management API endpoint, don’t split the user.sub
value for the API request - this is causing the 400 Bad Request response.
Try it it again with simply const id = user.sub;
You can also test the API call here after setting the setting the API Token: Auth0 Management API v2
Hope this helps!