Overview
When trying to add some info to app_metadata in a user’s profile, the metadata is successfully stored in app_metadata but the property is also seen at the top-level of the user object.
Cause
This is due to how the app_metadata is merged with the root user profile within the context of both Rules and Actions. More details about this can be found here.
Solution
app_metadata is merged into the root profile user object for Rules and Action execution. Therefore avoid giving app_metadata properties the same name as root profile attributes to avoid unexpected behavior.