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

Notifications

Announcements

No record found.

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
    Community Member Profile Picture
    on at

    Hello

    Please check this user has appropriate roles for this operation?

    According to me, you are missing something in roles

    thanks

  • Suggested answer
    Nishant Rana Profile Picture
    11,325 Microsoft Employee on at

    This might help

    nishantrana.me/.../

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans