Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Failing to authenticate to Dynamics 365 Online with User Credentials

Posted on by Microsoft Employee

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

  • Suggested answer
    Nishant Rana Profile Picture
    Nishant Rana 55 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
    Community Member Microsoft Employee 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans