# Can't get roles on SPA

**URL:** <https://community.auth0.com/t/cant-get-roles-on-spa/7318>\
**Category:** Get Help\
**Tags:** authorization, get-user-info-using-, roles\
**Created:** [June 29, 2017, 4:10am UTC](https://community.auth0.com/t/cant-get-roles-on-spa/7318 "2017-06-29T04:10:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harley](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@harley](https://community.auth0.com/u/harley)\
**Post date:** [June 29, 2017, 4:10am UTC](https://community.auth0.com/t/cant-get-roles-on-spa/7318/1 "2017-06-29T04:10:29Z")

</div>

I’m using API v8 and my client type is SPA. My test user has this app\_metadata defined:

```
{
      "authorization": {
    "roles": 
      "admin"
    ],
    "permissions": 
      "admin"
    ]
  }
}

```

After login, I can’t read those values. The scope gets

```
{
  email: "email@test.com"
  email_verified:false
  name:"name"
  nickname:"user"
  picture:"https://s.gravatar.com/avatar/xxxxcdn.auth0.com.png"
  sub:"auth0|5??a29b391??????123464"
  updated_at:"2017-06-27T22:22:03.087Z"
}

```

but how do I get the roles?  
Thanks!

---

<div class="post-metadata">

**Author:** ![prashantT](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/prashantt/32/6002_2.png) [@prashantT](https://community.auth0.com/u/prashantT)\
**Post date:** [June 29, 2017, 7:46am UTC](https://community.auth0.com/t/cant-get-roles-on-spa/7318/2 "2017-06-29T07:46:57Z")

</div>

You can assign those claims to the `id_token` (or `access_token`) via a Rule, outlined further here:

> **[OpenID Connect Scopes](https://auth0.com/docs/get-started/apis/scopes/openid-connect-scopes)**
>
> Understand scopes and claims used with the OpenID Connect (OIDC) protocol.

---

<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:** [March 2, 2018, 5:55am UTC](https://community.auth0.com/t/cant-get-roles-on-spa/7318/3 "2018-03-02T05:55:03Z")

</div>


