Auth0 Angular - 401 when trying to get/update the profile with auth0.client

I am using Auth0 alongside an Angular application. I am hitting the Management API of Auth0 to update the profile metadata with the following methods which I got from Auth0 documentation: public