Skip to main content

Notifications

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

  • 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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans