Azure AD 401 error on GET request to Graph API(Calendar.Read) RRS feed

  • Question

  • Hello Community Members,

       I am pretty new to Microsoft Azure and Azure AD platforms. I am trying out a small POC with Azure AD auth login.

    Below is my project set up.

      Framework : Vue Js

      Packaging Solution : WebApp

      MSAL library : vue-msal

      Steps Followed so far :-

       1. Signed up for Azure AD, created an application

       2. Signed up for 1 month free trial subscription for Azure Cloud Platform.

       3. Granted API permissions from Azure AD --> App Registration --> "My App" --> API permissions.

       4. Created a client side login.vue page and used vue-msal lib. for auth

       5. login successful and tried the next call to Graph Calendar API (action button) after login validation.

       6. Before registering @step2 - i was getting error code "403".

       7. After @step2 - I am getting response 401

       8. Access token from the App, network console section. All required permissions are part of the bearer token - "scp": "Calendars.Read email openid profile User.Read",


       Question 1 :- When I had signed up a test user, Azure AD prompted me for consent on email/profile sections. After I added additional permissions to my App, I tried logout / revoke permissions/ etc. When I re-login AD is not asking me consent once again. How to remove consent from user and enforce user to consent to additional permissions ? Could this be the reason for 401 error ? That I changed permissions after the user initially signed up and consented for initial list of permissions ?

       Question 2 :- What does it mean by below response         

    1. Request URL:
    2. Request Method:
    3. Status Code:
      <slot style="min-width:0px;min-height:0px;box-sizing:border-box;"></slot>
      401 Unauthorized

       message.message"The token contains no permissions, or permissions can not be understood."

        I am stuck with this problem for the last 2 days, any help or fix suggestion is greatly appreciated.

    Thank you


    • Edited by rahulpar Friday, June 26, 2020 4:03 PM Highlighting sections
    Friday, June 26, 2020 6:16 AM