web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Failing to authenticate to Dynamics 365 Online with User Credentials

(0) ShareShare
ReportReport
Posted on by

What I am doing: Trying to authenticate to Dynamics 365 Online using user credentials. 

Request URL:
POST login.microsoftonline.com/.../token

Request Headers:
Content-Type: application/x-www-form-urlencoded
Accept: application/json

Request Body:
client_id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
resource: domain.crm.dynamics.com
username: usertest@domain.com
password: xxxxxx
grant_type: password

Response Status: 400 Bad Request OK
Response Body:
{
"error": "invalid_grant",
"error_description": "AADSTS65001: The user or administrator has not consented to use the application with ID 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx' named 'xyz-d365-native'. Send an interactive authorization request for this user and resource.\r\nTrace ID: 8qbf47-7814-46cd-8879-115ed8adrzx\r\nCorrelation ID: cd665ce8-1rr9-6b26-81b5-698549f45896p\r\nTimestamp: 2018-04-25 07:48:28Z",
"error_codes": [
65001
],
"timestamp": "2018-04-25 07:48:28Z",
"trace_id": "8qbf47-7814-46cd-8879-115ed8adrzx",
"correlation_id": "cd665ce8-1rr9-6b26-81b5-698549f45896p",
"suberror": "consent_required"
}

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Nishant Rana Profile Picture
    11,325 Microsoft Employee on at
    RE: Failing to authenticate to Dynamics 365 Online with User Credentials

    This might help

    nishantrana.me/.../

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Failing to authenticate to Dynamics 365 Online with User Credentials

    Hello

    Please check this user has appropriate roles for this operation?

    According to me, you are missing something in roles

    thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans