Forum Discussion

jony dept's avatar
jony dept
Copper Contributor
Jun 07, 2017

Microsoft Graph API oAuth

How to do oAuth of Azure AD to call Microsoft Graph API in SPFx?

 

I tried with Hellojs but it is not working throws error. "Cannot read response_type property of undefined"

 

Can anyone guide me to do it.

 

Thanks in advance.

4 Replies

    • jony dept's avatar
      jony dept
      Copper Contributor

      I want to get all users of Azure Active Directory using Microsoft Graph API and scripting langauge supported by SharePoint Framework ( Angular/ React/ Knockout/ Typescript)

       

       

      • Michal Guzowski's avatar
        Michal Guzowski
        Brass Contributor

        Few days ago I struggled with exact same problem but using CSOM.

        In my case the app should've been headless and I follow this article that works for me
        http://www.cloudidentity.com/blog/2014/07/08/using-adal-net-to-authenticate-users-via-usernamepassword/
        I found that there is ADAL C# equivalent in JS (https://github.com/AzureAD/azure-activedirectory-library-for-js).

        However if you your app is with UI I think you can check this example https://dev.office.com/code-samples-detail/4637 (but I did not check it).