Thanks Nik, that’s not what I’m seeing though. Perhaps it depends on if you’re doing it as an admin or a user? For example here is my logged in user’s access token (with the idToken
extracted):
{
"iss": "<API_URL>.auth0.com/",
"sub": "<CURRENT_USER_ID>",
"aud": [
"<MANAGEMENT_API_IDENTIFIER>/api/v2/",
"<API_URL>/userinfo"
],
"iat": 1747320142,
"exp": 1747327342,
"scope": "openid email update:current_user_metadata",
"azp": "<CLIENT_ID>"
}
And the Curl command
curl --request PATCH \
--url '<YOUR_ENDPOINT_URL>/api/v2/users/<CURRENT_USER_ID>' \
--header 'authorization: Bearer <ACCESS_TOKEN_WITH_SCOPES_AND_AUDIENCE>' \
--header 'content-type: application/json' \
--data '{"user_metadata": {"json": "Changed", "prefs": ["two", "three", "four"]}}'
Returns only
{"user_metadata":{"json":"Changed","prefs":["two","three","four"]}}