Edit

Create an add-in-scoped external content type in SharePoint

The SharePoint Add-in portions of this article are legacy guidance. The retirement below doesn't retire the other APIs or platforms discussed here.

Important

SharePoint Add-ins reached end of life in SharePoint Online on April 2, 2026. Both SharePoint-hosted and provider-hosted Add-ins are retired and no longer work in SharePoint Online, including government clouds. Add-in development, deployment, and usage guidance is retained for historical reference and for applicable SharePoint Server scenarios, not for new SharePoint Online solutions.

SharePoint Server Add-ins deployed through an on-premises app catalog are not retired by this change. Acquiring SharePoint Add-ins from the public marketplace ended on April 2, 2026 for SharePoint Server.

This retirement does not retire SharePoint REST APIs, CSOM, JSOM, or SharePoint Framework (SPFx). For SharePoint Online, use SPFx for user interface extensions and Microsoft Entra ID for authentication to external applications. See the retirement announcement and Add-in migration guidance.

Learn how to create external content types that can be installed, secured, and used in an SharePoint Add-in.

Prerequisites for developing add-in-scoped external content types

To get started developing add-in-scoped external content types, you need the following:

  • SharePoint

  • Visual Studio 2012

  • Office Developer Tools for Visual Studio 2012

  • A published OData service available through the Internet

For information about setting up a SharePoint development environment, see Set up a general development environment for SharePoint.

Create an add-in-scoped external content type

The following steps show how to create an external content type based on an Open Data protocol (OData) source, and how to modify it to be scoped to your SharePoint Add-in.

To create a new SharePoint Add-in

  1. Open Visual Studio 2012.

  2. Create an Add-in for SharePoint project.

  3. Specify the add-in settings, including add-in name, the site URL for debugging the add-in, and how you would like to host the add-in (Autohosted, Provider-hosted, or SharePoint-hosted). For more information, see Choose patterns for developing and hosting your SharePoint Add-in.

  4. Choose Finish to create the app.

For complete steps for creating SharePoint Add-ins, see the following:

To generate the external content type

  1. In Solution Explorer, open the shortcut menu for the project, and choose Add, Content types for External Data source.

    This starts a wizard that helps you find the selected data source and create the BDC model.

  2. On the Set OData Source page, enter the URL of the OData service that you want to connect to. The URL should look something like this: http://services.odata.org/Northwind/Northwind.svc/.

    Specify a name for your OData source.

    Note

    For this example, you will use the Northwind service that is available from the producers list located on the Open Data Protocol website.

  3. A list appears showing data entities that are being exposed by the OData Service. Select one or more of the entities, and choose Finish.

To deploy the add-in-scoped external content type

  • Press F5 to compile the project and upload the project files to SharePoint.

See also