I would like to call an ODATA service from a Sharepoint add-in, I am following the tutorial here:


I have installed the Sharepoint Client SDK, however when I create the console application and attempt to add the reference, I cannot find the Microsoft.SharePoint dll.

Is there any other package required in order to use the ODATA. I am currently building an add-in that needs to be displayed in/as a site within Office 365 (which from my understanding means SharePoint hosted).

I have had success following the tutorial in recieving a repsonse from the SP.RequestExtractor. I would like to invoke this service:


so that I can retrieve and create entities When I tried using the Add -> Content Type for External Data Source, it caused the following error:

Unknown EDMType: The EDM Type of the key:
ODATADemo.Product is not supported by .NET as an identifier. 

What is the correct mechanism for configuration of and requesting data an ODATA service?


First thing, you won`t see the Microsoft.SharePoint.dll for SharePoint add-in and console application running on remote system. You must use Microsoft.SharePoint.Client.dll which you can get it from the downloaded Client SDK.

The below MSDN article will give you how to use SharePoint https://msdn.microsoft.com/en-us/library/office/fp179927.aspx?f=255&MSPPError=-2147217396

One more article below with examples https://blog.mastykarz.nl/using-sharepoint-rest-api-in-provider-hosted-apps/

Proivde additional details on what type of app you are building (SharePoint hosted or Provider Hosted) and business scenario to get specific answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.