Forum Discussion

yoioreloaded's avatar
yoioreloaded
Copper Contributor
Aug 31, 2019
Solved

AADSTS65001: The user or administrator has not consented ... when using v2.0 endpoints

Hi all,   while developing an application that relies on Azure AD for authentication, I found out what seems to be an issue with v2.0 endpoints.   TL;DR: When requesting a Bearer Token using an au...
  • Rishabh Srivastava's avatar
    Aug 31, 2019

    As per the details that you have mentioned, 

    Grant_type is the parameter used for V1.0 Endpoints, 
    https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-oauth-code


    For v2.0, add scope in the initial request of requesting code, 

     

    GET https://login.microsoftonline.com/common/oauth2/v2.0/authorize?
    client_id=6731de76-14a6-49ae-97bc-6eba6914391e
    &response_type=code
    &redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F
    &response_mode=query
    &scope=
    https%3A%2F%2Fgraph.microsoft.com%2Fcalendars.read%20
    https%3A%2F%2Fgraph.microsoft.com%2Fmail.send
    &state=12345

     

    Let me know, if still it doesn't work.

     

    Thanks !!

     

     

Resources