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
This might help
Hello
Please check this user has appropriate roles for this operation?
According to me, you are missing something in roles
thanks
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156