Lock to return app_metadata

You can set the namespaced claim in the Rule, to return your user_metadata in the id_token

...
    context.idToken[namespace + 'user_metadata'] = user.user_metadata;