# App metadata in resource owner

**URL:** <https://community.auth0.com/t/app-metadata-in-resource-owner/10781>\
**Category:** Get Help\
**Created:** [April 10, 2018, 5:46pm UTC](https://community.auth0.com/t/app-metadata-in-resource-owner/10781 "2018-04-10T17:46:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashiraz](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@ashiraz](https://community.auth0.com/u/ashiraz)\
**Post date:** [April 10, 2018, 5:46pm UTC](https://community.auth0.com/t/app-metadata-in-resource-owner/10781/1 "2018-04-10T17:46:59Z")

</div>

I’m trying to obtain a token via the resource owner grant, as follows:

POST https://\<auth0\_domain\>/oauth/token

```
{
"grant_type":"http://auth0.com/oauth/grant-type/password-realm",
"client_id":"<client id>",
"password":"<pwd>",
"scope":"openid name email app_metadata identities",
"username":"<some user>",
"realm":"<some connection>"
}

```

When I invoke this, it returns with a token, but with an additional property:

`"scope": "openid email"`

Why is it returning only openid and email, while I requested app\_metadata also?

---

<div class="post-metadata">

**Author:** ![kimcodes](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kimcodes/32/81052_2.png) [@kimcodes](https://community.auth0.com/u/kimcodes)\
**Post date:** [April 11, 2018, 1:23pm UTC](https://community.auth0.com/t/app-metadata-in-resource-owner/10781/3 "2018-04-11T13:23:01Z")

</div>

👋 @ashiraz

The `oauth/token` endpoint is compliant with the OpenID Connect specification. As per the OIDC-compliant pipeline, only a small number of attributes are marked as [standard claims](https://auth0.com/docs/api-auth/tutorials/adoption/scope-custom-claims#standard-claims) and only these will be returned in the token, like the `openid email` you are seeing. Any additional claims need to be added by manual mapping and following a namespaced format to avoid possible collisions with standard claims. These [custom claims](https://auth0.com/docs/api-auth/tutorials/adoption/scope-custom-claims#custom-claims) can only be added using a [Rule](https://auth0.com/docs/rules/current). The rule will look something like this:

```auto
function (user, context, callback) {

  var namespace = 'https://example.com/';
  context.idToken[namespace + 'user_metadata'] = user.user_metadata;

  callback(null, user, context);
}

```

---

<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:** [September 5, 2018, 8:38pm UTC](https://community.auth0.com/t/app-metadata-in-resource-owner/10781/4 "2018-09-05T20:38:47Z")

</div>

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