# Failed to obtain access token

**URL:** <https://community.auth0.com/t/failed-to-obtain-access-token/65949>\
**Category:** Get Help\
**Tags:** windows, login\
**Created:** [July 11, 2021, 6:49am UTC](https://community.auth0.com/t/failed-to-obtain-access-token/65949 "2021-07-11T06:49:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![development2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/development2/32/12814_2.png) [@development2](https://community.auth0.com/u/development2)\
**Post date:** [July 11, 2021, 6:49am UTC](https://community.auth0.com/t/failed-to-obtain-access-token/65949/1 "2021-07-11T06:49:31Z")

</div>

Hey there,

I have created Azure AD tenant and registered application by following same steps which provided here:

> **[Quickstart: Create an Azure Active Directory tenant - Microsoft Entra](https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-create-new-tenant)**
>
> In this quickstart, you learn how to create an Azure Active Directory tenant for use in developing applications that use the Microsoft identity platform for authentication and authorization.

> **[Quickstart: Register an app in the Microsoft identity platform - Microsoft Entra](https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app)**
>
> In this quickstart, you learn how to register an application with the Microsoft identity platform.

I’m not sure if I’m missing anything, but whenever I try to check my connection through auth0 dashboard only, it gives me following error:

```auto
{
  "error": "invalid_request",
  "error_description": "failed to obtain access token"
}

```

Please suggest me if I’m making any mistake.  
Thanks

---

<div class="post-metadata">

**Author:** ![sidharth.chaudhary](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sidharth.chaudhary/32/20686_2.png) [@sidharth.chaudhary](https://community.auth0.com/u/sidharth.chaudhary)\
**Post date:** [July 12, 2021, 5:25am UTC](https://community.auth0.com/t/failed-to-obtain-access-token/65949/2 "2021-07-12T05:25:52Z")

</div>

Hey @development2 ,

The docs you have linked are for Microsoft tenant configuration, not Auth0.  
Can you please let me know if you are trying to configure an Azure AD connection on the Auth0 side?  
and which Auth0 specific doc are you referring to?

Regards,  
Sid

---

<div class="post-metadata">

**Author:** ![unamashana](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/unamashana/32/30523_2.png) [@unamashana](https://community.auth0.com/u/unamashana)\
**Post date:** [July 13, 2021, 8:22pm UTC](https://community.auth0.com/t/failed-to-obtain-access-token/65949/3 "2021-07-13T20:22:48Z")

</div>

Hey @sidharth.chaudhary - I can confirm that I see the same error after following your official guide - [https://auth0.com/docs/connections/social/microsoft-account](https://auth0.com/docs/connections/social/microsoft-account)

I have double-checked all the steps and even recreated a new tenant/application in Azure. Nothing helps. Is there an issue at your end?

Thanks,  
Hana

---

<div class="post-metadata">

**Author:** ![sidharth.chaudhary](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sidharth.chaudhary/32/20686_2.png) [@sidharth.chaudhary](https://community.auth0.com/u/sidharth.chaudhary)\
**Post date:** [July 14, 2021, 12:45am UTC](https://community.auth0.com/t/failed-to-obtain-access-token/65949/4 "2021-07-14T00:45:58Z")

</div>

Hey @unamashana , We do not have any reported issues at the moment.  
Are you getting the same error?

```auto
 {
  "error": "invalid_request",
  "error_description": "failed to obtain access token"
}

```

If possible can you please DM me a HAR file of your login for further review?  
Method to get HAR File : [Generate and Analyze HAR Files](https://auth0.com/docs/troubleshoot/har)

Regards,  
Sid

---

<div class="post-metadata">

**Author:** ![unamashana](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/unamashana/32/30523_2.png) [@unamashana](https://community.auth0.com/u/unamashana)\
**Post date:** [July 14, 2021, 7:11am UTC](https://community.auth0.com/t/failed-to-obtain-access-token/65949/5 "2021-07-14T07:11:01Z")

</div>

Sent! Thanks for your help.

---

<div class="post-metadata">

**Author:** ![sidharth.chaudhary](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sidharth.chaudhary/32/20686_2.png) [@sidharth.chaudhary](https://community.auth0.com/u/sidharth.chaudhary)\
**Post date:** [July 15, 2021, 5:11am UTC](https://community.auth0.com/t/failed-to-obtain-access-token/65949/6 "2021-07-15T05:11:24Z")

</div>

Hey @unamashana , Have replied you with the exact error on the backend.  
Are you working on a Microsoft enterprise connection or Microsoft social?

Regards,  
Sidharth

---

<div class="post-metadata">

**Author:** ![unamashana](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/unamashana/32/30523_2.png) [@unamashana](https://community.auth0.com/u/unamashana)\
**Post date:** [July 15, 2021, 7:38am UTC](https://community.auth0.com/t/failed-to-obtain-access-token/65949/7 "2021-07-15T07:38:15Z")

</div>

Thanks, Sidharth. Your messaged helped me find the root issue, which was

> Make sure you have copied **client secret value** and not the client secret ID.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 15, 2021, 11:42am UTC](https://community.auth0.com/t/failed-to-obtain-access-token/65949/8 "2021-07-15T11:42:26Z")

</div>

Glad it’s working for you now!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 29, 2021, 10:45am UTC](https://community.auth0.com/t/failed-to-obtain-access-token/65949/9 "2021-07-29T10:45:28Z")

</div>


