Forum Discussion
ADAL Rest API SharePoint Online
Hi Joe Gill,
Can you tell us what SharePoint resource you are trying to access to (i.e what is your REST call) and what permissions you've set for your AAD app? It can be simply a normal behavior due to insufficient permissions.
- Joe GillMar 22, 2018Copper Contributor
Hi Franck,
I gave the application rights as follows in Azure AD. Just trying to go a GET to read items
Is it possible to use ADAL for server to server authentication to SharePoibt online?
Thanks
Joe
- Franck CornuMar 22, 2018Brass Contributor
Yes it is possible to use ADAL for server-to-server authentication using app-only access. However, you will need a certificate to get it work with Azure AD. More info https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly& https://docs.microsoft.com/en-us/sharepoint/dev/solution-guidance/security-apponly-azuread.
This is why you get a 401 status because you don't have one.
Franck.
- Franck CornuMar 26, 2018Brass Contributor