# Trying to obtain access token gives 401 access denied error

**URL:** <https://community.auth0.com/t/trying-to-obtain-access-token-gives-401-access-denied-error/69653>\
**Category:** Get Help\
**Tags:** api, management-api, auth0\
**Created:** [September 14, 2021, 8:44pm UTC](https://community.auth0.com/t/trying-to-obtain-access-token-gives-401-access-denied-error/69653 "2021-09-14T20:44:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashsubedi.ae](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ashsubedi.ae/32/14581_2.png) [@ashsubedi.ae](https://community.auth0.com/u/ashsubedi.ae)\
**Post date:** [September 14, 2021, 8:44pm UTC](https://community.auth0.com/t/trying-to-obtain-access-token-gives-401-access-denied-error/69653/1 "2021-09-14T20:44:49Z")

</div>

Hi Everyone,  
I am trying to access **mydomain.oauth/token** to obtain the access token and getting 401 access denied message from my website in Sitecore using [Asp.net](http://Asp.net) MVC (using Owin QuickStart quide from Auth0).  
I tried from a console app and it works fine. I have the correct client id, client secret, audience, and following this guide.  
[Get Management API Access Tokens for Production](https://auth0.com/docs/security/tokens/access-tokens/get-management-api-access-tokens-for-production)  
Any insights or advice would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![ashsubedi.ae](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ashsubedi.ae/32/14581_2.png) [@ashsubedi.ae](https://community.auth0.com/u/ashsubedi.ae)\
**Post date:** [September 14, 2021, 10:27pm UTC](https://community.auth0.com/t/trying-to-obtain-access-token-gives-401-access-denied-error/69653/2 "2021-09-14T22:27:20Z")

</div>

The answer is here: [Claims doesn't have all the user information](https://community.auth0.com/t/claims-doesnt-have-all-the-user-information/69392)

**summary** : I had to call the API Explorer Application (Machine to Machine) with the relevant client id and secret, not the regular web application.

---

<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 29, 2021, 10:28pm UTC](https://community.auth0.com/t/trying-to-obtain-access-token-gives-401-access-denied-error/69653/3 "2021-09-29T22:28:12Z")

</div>

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