# How to update "app\_metadata" in Android SDK

**URL:** <https://community.auth0.com/t/how-to-update-app-metadata-in-android-sdk/109454>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [June 17, 2023, 4:51pm UTC](https://community.auth0.com/t/how-to-update-app-metadata-in-android-sdk/109454 "2023-06-17T16:51:41Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anupkumar.bora](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@anupkumar.bora](https://community.auth0.com/u/anupkumar.bora)\
**Post date:** [June 17, 2023, 4:51pm UTC](https://community.auth0.com/t/how-to-update-app-metadata-in-android-sdk/109454/1 "2023-06-17T16:51:41Z")

</div>

As we are using OKTA Auth0 Android SDK for authentication , we are getting “user\_metadata” and “app\_metadata” object in OKTA Auth0 login response. So, as per our need we can update “user\_metadata”. But I’m not able to find how to update “app\_metadata” in Android.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [June 19, 2023, 6:10pm UTC](https://community.auth0.com/t/how-to-update-app-metadata-in-android-sdk/109454/3 "2023-06-19T18:10:46Z")

</div>

Hi @anupkumar.bora,

Welcome to the Auth0 Community!

Using the Auth0 Android SDK there is a `updateMetdata` method that you can use use to update the user\_metadata. In the background, it is calling the Management API’s Update a User endpoint.

For example:

```auto
client.updateMetadata("{user id}", "{user metadata}")
    .start(object: Callback<UserProfile, ManagementException> {
        override fun onSuccess(result: UserProfile) { }
        override fun onFailure(error: ManagementException) { }
})

```

Please see the [UsersAPIClient - auth0 2.9.3 javadoc](https://javadoc.io/doc/com.auth0.android/auth0/latest/com/auth0/android/management/UsersAPIClient.html) documentation for your reference.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![anupkumar.bora](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@anupkumar.bora](https://community.auth0.com/u/anupkumar.bora)\
**Post date:** [June 20, 2023, 2:54am UTC](https://community.auth0.com/t/how-to-update-app-metadata-in-android-sdk/109454/4 "2023-06-20T02:54:13Z")

</div>

Hi @rueben.tiow , as per our need we can update “user\_metadata” using `updateMetadata’ method. But I’m not able to update data elements inside “app\_metadata”. Can you please provide guidelines/examples on how to do it?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [June 23, 2023, 6:39pm UTC](https://community.auth0.com/t/how-to-update-app-metadata-in-android-sdk/109454/5 "2023-06-23T18:39:32Z")

</div>

Hi @anupkumar.bora,

Thank you for your reply.

> [@anupkumar.bora](#):
>
> But I’m not able to update data elements inside “app\_metadata”.

Would you be able to provide me an example of what you have tried so far?

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![anupkumar.bora](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@anupkumar.bora](https://community.auth0.com/u/anupkumar.bora)\
**Post date:** [June 26, 2023, 5:58pm UTC](https://community.auth0.com/t/how-to-update-app-metadata-in-android-sdk/109454/6 "2023-06-26T17:58:56Z")

</div>

Hi @rueben.tiow ,  
When I try to pass “[https://DineIPAASAPI.com/](https://dineipaasapi.com/)” (custom API) audience with “WebAuthProvider” class with login method, that time I get “Oops!,something went wrong” error message. Here is the screenshot attached. Can you please provide guidelines on how to get customer access token in Android ?

 ![MicrosoftTeams-image (26)](https://global.discourse-cdn.com/auth0/original/3X/d/c/dc56c866ada792e27ddd5b87253941fc88872f9c.png)

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [June 28, 2023, 4:13pm UTC](https://community.auth0.com/t/how-to-update-app-metadata-in-android-sdk/109454/7 "2023-06-28T16:13:22Z")

</div>

Hi @anupkumar.bora,

Thanks for following up.

Just to circle back, I have searched through our Auth0 Android SDK and can confirm that there isn’t an equivalent way to update the user’s **app\_metadata**.

To the best of my knowledge, this is by design and will require you to call the Management API to [update the user’s app\_metadata](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id) if this is needed.

I hope I have answered your question!

Please let me know if there’s anything else I can do to help.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![anupkumar.bora](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@anupkumar.bora](https://community.auth0.com/u/anupkumar.bora)\
**Post date:** [June 30, 2023, 3:09pm UTC](https://community.auth0.com/t/how-to-update-app-metadata-in-android-sdk/109454/8 "2023-06-30T15:09:00Z")

</div>

Hi @rueben.tiow, Can you please provide examples of how to update user’s app\_metadata?

---

<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:** [July 14, 2023, 3:09pm UTC](https://community.auth0.com/t/how-to-update-app-metadata-in-android-sdk/109454/9 "2023-07-14T15:09:56Z")

</div>

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