Auto migration on Update User via Management API

I’m trying to get auto-migration set up and working for my Auth0 Connection. I have the Login and GetUser scripts inserted, and have verified that on login users are migrated correctly - including some rules to handle RBAC assignments since you don’t provide that out of the box.

The trouble I am having is that my application has 2 sides - a public website and a back-end customer management tool. Using this back-end tool we can update a customer’s profile data (name, email, etc). When doing so I use the .Net Auth0 Management API to fire an UpdateUser request (/api/v2/users/{id}). Your docs seem to indicate that calls to update a user’s email address or username would trigger auto migration, but I can see these are deprecated and replaced by UpdateUser. However when I run that call I get a “User does not exist” error, and can see that there was no attempt to fire my GetUser script.

Is there anything I can do to force the Management API to trigger migration on user updates. My only other option is to try and handle this error so I still update to my existing DB and then wait to migrate users only when they log in or change password. I feel this approach would be dangerous.

Any help appreciated.

1 Like

Hello! Welcome to our community.

We would need more information to understand your case.

  • What kind of connection do you have?
  • What do you mean for “auto-migration”?

Thanks.

Sorry, I’ve been so deep in this for the week I thought that would be implied by the question.

I’m using a Database connection with the option to use my own custom database. I have enabled the option to import users to Auth0 (Authomatic migration). As such i have configured the Login and GetUser scripts. I have verified that the Login script and migration works.

This document (Configure Automatic Migration from Your Database) suggests that GetUser should be fired when the Management API receives a request to update a User’s profile - this is not happening in my case.

Any help would be appreciated

Were you ever able to figure this out? We are running into the same problem.