# How to update user\_metadata from front-end directly

**URL:** <https://community.auth0.com/t/how-to-update-user-metadata-from-front-end-directly/61306>\
**Category:** Get Help\
**Created:** [April 18, 2021, 4:33pm UTC](https://community.auth0.com/t/how-to-update-user-metadata-from-front-end-directly/61306 "2021-04-18T16:33:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hello2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/hello2/32/13404_2.png) [@hello2](https://community.auth0.com/u/hello2)\
**Post date:** [April 18, 2021, 4:33pm UTC](https://community.auth0.com/t/how-to-update-user-metadata-from-front-end-directly/61306/1 "2021-04-18T16:33:17Z")

</div>

Hi there,

I have an Angular app that uses Auth0 on the front-end to handle authentication and also authenticates some API routes. However, I’m trying to move towards a more serverless architecture so I’d like the front-end to communicate directly with Auth0 when the user manages things like their profile info e.g. the user\_metadata object.

I understand the Management API can set the user\_metadata properties but that’s only secure on the server, not the front-end (because it would expose app-level credentials) and I’m trying to minimise using servers directly.  
So I’d like to know which API endpoint I can use to achieve the setting of the user\_metadata in a secure way on the front-end?

Thanks very much.

---

<div class="post-metadata">

**Author:** ![stephanie.chamblee](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stephanie.chamblee/32/26087_2.png) [@stephanie.chamblee](https://community.auth0.com/u/stephanie.chamblee)\
**Post date:** [April 19, 2021, 1:24pm UTC](https://community.auth0.com/t/how-to-update-user-metadata-from-front-end-directly/61306/3 "2021-04-19T13:24:20Z")

</div>

Hi @hello2,

You are correct that for most Management API endpoints, you must requests server-side. However, there are a few endpoints that you can use from a SPA. You can use the Management API to update `user_metadata` for the current user from a SPA. The steps are described here:

> **[Get Management API Access Tokens for Single-Page Applications](https://auth0.com/docs/secure/tokens/access-tokens/get-management-api-tokens-for-single-page-applications)**
>
> Learn about available scopes and endpoints for Management API tokens for Single-page Applications (SPAs).

Let me know if you have additional questions!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 4, 2021, 1:24pm UTC](https://community.auth0.com/t/how-to-update-user-metadata-from-front-end-directly/61306/4 "2021-05-04T13:24:40Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
