Error while trying to access Calendars through Graph API in Node.js RRS feed

  • Question

  • I have a node.js/express application. I am trying to use the Microsoft Graph API to fetch users' Calendars [read-only].

    OAuth2 library for login: passport-microsoft npm module.

    I followed the following steps in the Azure Portal:

    Go to Active Directory

    Click on App Registrations in the left pane

    Click on New Registration and create an app
    Go to the new app
    Click on Authentication in the left panel and add redirect URI's
    Go to API Permissions and enable the following :

    a. Delegated: Calendars.Read, Calendars.Read.Shared, profile

    Provide Admin Consent for all the permissions that require it.
    However, only users who belong to my azure organisation, under which I have registered my web application, are able to login.

     InternalOAuthError: failed to fetch user profile

    Monday, November 11, 2019 11:04 AM