Auth0 Forms Update User 401 error

I have setup an Auth0 Form for a OTP verification email flow.

I created the following:

  1. M2M Application with Auth0 Management API permission for read/write users, app_user_metadata.
  2. In Auth0 Forms > Vault: I created the connection for Auth0 with the M2M application data (tenant, client id, client secret)
  3. Connection to Auth0 is successful

The flow is working and everything is a success, when the otp code is confirmed and verified the next step is to update the user metadata, however that specific request is failing due to an invalid bearer token.

Below are the screen shots of the implementation:

Did you resolve this? Having same issue.

Hello All, I resolved the issue. I found an amazing help article that took a while to find. I was using a SPA application and not a M2M. After changing to M2M it worked perfect!

developer.auth0.c0m

resources/labs/forms/user-onboarding-made-easy#create-a-flow-to-update-user-metadata

Hi @sam.karl

Thank you for sharing that, great to hear that it’s now working for you!

@joao.magalhaes Please let me know if you had a moment to check the documentation provided by Sam and if it helped with your current error, I’ve linked it to make things easier.

One thing I noticed is that you might require create:users_app_metadata permission enabled as well in order to properly add " email_verified : True " to the user’s app_metadata. Usually to update the email_verified attribute, you would only need update:users and use the user.email_verified property under the user body, but since you wish to add this to their app_metadata, you would also need the permission to create it.

It might prove useful to have this other documentation handy as well on variables and functions within Forms.

Hope this helped!
Gerald