# Newbie: Confused about Auth0 setting and workflow

**URL:** <https://community.auth0.com/t/newbie-confused-about-auth0-setting-and-workflow/19462>\
**Category:** Get Help\
**Created:** [December 30, 2018, 5:37am UTC](https://community.auth0.com/t/newbie-confused-about-auth0-setting-and-workflow/19462 "2018-12-30T05:37:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dean123](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dean123/32/8614_2.png) [@Dean123](https://community.auth0.com/u/Dean123)\
**Post date:** [December 30, 2018, 5:37am UTC](https://community.auth0.com/t/newbie-confused-about-auth0-setting-and-workflow/19462/1 "2018-12-30T05:37:01Z")

</div>

Hi there,

I am quite new to Auth0.  
I have a SPA application and a backend API (Account API) service protected by Auth0. I have configured SPA to use Auth0 and can login successfully.

However, I have trouble to configure Account API (using Authorize with scope) by JWT Bearer token. I keep getting invalid token error.  
So, need help on a couple of things:

- Logged into SPA with requesting scopes: openid profile email app\_metadata read:account  
\*\* read:account is the scope of the Account API

- I have to set Authorization header, with idtoken value before calling the Account API. Did I pass the correct token to call Account API?

I followed up the tutorial and documentation to set up Account API with Authorize(“read:account”). My code is exact like: [ASP.NET Core Web API - Auth0 Docs](https://auth0.com/docs/quickstart/backend/aspnet-core-webapi#validate-access-tokens)  
I think I may miss some settings in Auth0 or I misunderstood something.

Thanks

---

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [December 30, 2018, 12:20pm UTC](https://community.auth0.com/t/newbie-confused-about-auth0-setting-and-workflow/19462/2 "2018-12-30T12:20:20Z")

</div>

Hi Dean. In your setup, Auth0 will return two tokens in the authorization response: the ID Token, which contains information about the user and authentication process, and an Access Token.  
The ID Token’s audience is the client application itself (the SPA), so that the app can know the information about the user.  
The Access Token audience is the backend API, so this is the bearer token that should be used when making requests to the API.  
Also, make sure you include `audience: "your-api-identifier"` in the authorization request from the SPA, to indicate that the application is looking for a token to access the API.

---

<div class="post-metadata">

**Author:** ![Dean123](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dean123/32/8614_2.png) [@Dean123](https://community.auth0.com/u/Dean123)\
**Post date:** [December 30, 2018, 12:40pm UTC](https://community.auth0.com/t/newbie-confused-about-auth0-setting-and-workflow/19462/3 "2018-12-30T12:40:11Z")

</div>

Hi Nicolas,

thanks for your quick respond.  
Yeah, I got it working now. confused a couple of concepts.

much appreciated.

---

<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:** [January 29, 2019, 12:40pm UTC](https://community.auth0.com/t/newbie-confused-about-auth0-setting-and-workflow/19462/4 "2019-01-29T12:40:13Z")

</div>

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