I have an application that is hosted in Azure website which consumes information from within SharePoint.
Microsoft has provided the ADAL.js library to allow interface with Azure Active Directory and retrieve a token to Authenticate to SharePoint. it is up and working fine for the /_api endpoints but i have a need to use the /_vti_bin/listdata.svc.
If i make this call in Postman from my local computer using the ADAL token it returns the response data as expected.
/_vti_bin/Listdata.svc/LinkList?$select=Contract/ContractName,Contract/Manager/Name,Contract/ContentType,Contract/Attachments&$expand=Contract/Manager&$filter=ProjectId eq 1 and Contract ne null
However if i send the same call from the application I recieve the following error.
XMLHttpRequest cannot load https://[tenant].sharepoint.com/BMS2/_vti_bin/listdata.svc/LinkList?$select=Contract/ContractName,Contract/Manager/Name,Contract/ContentType,Contract/Attachments&$expand=Contract/Manager&$filter=ProjectId eq 1 and Contract ne null Response for preflight is invalid (redirect)