Business Connectivity Services in SharePoint 2013 – App Scoped external content types

One of the new things about the External List in SharePoint 2013 is the ability to create app scoped external content types that are scoped at the app level in SharePoint 2013. In other words Business Connectivity Data models can be scoped to apps for SharePoint so you don’t have to deploy External Content Type  to the Farm and you don’t have to involve an administrator in order to access Business Connectivity Service in the Farm. Farm level External Content Types work great for farm solutions but this approach is not applicable for apps in SharePoint 2013 as app is an isolated. So another reason for adding an app-scoped external content type is to provide access to external data from an individual app. For Apps, BDC model is stored in a file in a document library rather than in BDC metadata store. When the app is run SharePoint uses FileBackedMetdataCataog to read metadata from this file into in-memory BDC runtime which can be read by an external list then. This BDC runtime can work with ECTs based on MS SQL, WCF/Web services and OData . Custom connectors and .net assembly connectors cannot be used along with this runtime BDC and hence with App level ECTs.

In order to create app-scoped External Content Type you may follow this blog post Business Connectivity Services in SharePoint 2013 – External Content Type based on OData sources. When you create an app and open Element.xml with List declaration you may see  MetadataCatalogFileName property which  is used to define the BDC model file that contains the external content type definition.

MetadataCatalogFileName property

The description of included BDC model in a WSP file for deployment you may see in this Element.xml. One important notice is the only one BDC model file can be included per app.

Path to BDC Model file

When you deploy this app you won’t be able to use created app-scoped External content Type in the Farm. If you try to create an External List manually in any site you will see that External Content Type Picker shows nothing.

External Content Type Picker shows nothing

Also there is no any ECT in BCS Service in Central Administration.

There is no any External Content Type in BCS Service

So now let’s consider how created app-scoped BDC model can be used  in a Farm solution. It’s useful because currently there is no support of OData sources in SharePoint Designer 2013 and there is even no toolset or wizard to generate the BDC Model in Visual Studio 2013 for use in a Farm solution. Right-click on your project and click “Publish”.

Publish app for SharePoint

Find generated BDC Model file in the pkg folder. In my case this file BDCMetadata.bdcm resides here in solution “ODataECTDemoODataECTDemopkgDebugODataECTDemoODataECTDemo_Feature1External Content Types”. Go to central admin BCS service and import this BDC model file as is (do not any changes in it).

Import BDC model in Central Administration

Now your External Content Type can be accessed across the Farm.

External Content Type is available

And you will be able to create external lists using imported external content type.

Created External List

If you have any questions feel free to email them to

<Dmitry Kaloshin/>

This esseitnally means that you don’t have to deploy your solution to the Farm anymore, but can deploy it as an App instead. – See more at:
This esseitnally means that you don’t have to deploy your solution to the Farm anymore, but can deploy it as an App instead. – See more at:
Related Posts
Clear Filters