Forum Discussion
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
- Michal GuzowskiBrass ContributorCan you describe a context? What do you want to achieve with that?
- jony deptCopper 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 GuzowskiBrass 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).