Monday, May 16, 2016

SharePoint 2013: How to develop Remote Event Receivers for App Events

In this second post on Remote Event Receivers we are going to explore the implementation details of “Remote Event Handlers for App Events”.

In case you need to recall the concepts related to “Remote Event Receivers”, you can refer to my First post in this series SharePoint 2013: Remote Event Receivers

In order to show case the implementation details of Remote Event Handler for App Events, let’s start with creating a Provider Hosted App by using following steps:

Create New Project in Visual Studio using “App for SharePoint” Project template

1

Specify Host Web URL and choose “Provider-hosted” as App Type

2

Choose “ASP.Net Web Forms Application” as Project Template to create Remote Web for our Provider Hosted App

3

Specify Certification Details based on the configuration of Provider-Hosted App Development Environment. Following details needs to be provided:

  • Certificate Location
  • Password
  • Issuer ID

4

Once all the above steps executed successfully we will get a new Solution created with two projects:

  • PH-AppEventLifeCycle which is a Provider Hosted App
  • PH-AppEventLifeCycleWeb which is a Remote Web for App

5

Select Provider Hosted App Project and press F4 to see the Project Properties. In the Project Properties look for “App for SharePoint Events” section and enable all events that you want to get handled by Remote Event Receiver.

Here I have set all the three events “Handle App Installed”, “Handle App Uninstalling, “Handle App Upgraded” to True, this setting will allow SharePoint to delegate respective events to the registered Event Receiver.

6

In case you need to create an App Web for your Provider Hosted Web (though it is not necessary) you must have atleast one Web Scoped Artifact added in the Project as this action will force SharePoint App Framework to provision App Web during the App Deployment.

In this case I have added a Dummy Module deploying some sample file just to force SharePoint to create an App Web for our Provider Hosted App.

7

It is noteworthy to look for AppManifest.xml file as most of the configuration settings for an App are derived from here only.

In General Tab, we have two noteworthy Properties:

  • Start Page: It allows you to set any Page as App Start Page. In this case we have set it point to the Default.aspx Page in Remote Web.
  • Query String : Allows adding additional information as Query String Parameters while redirecting to the Start Page

8

In Permission Tab, we can specify the set of Permissions that App will need to perform desired tasks.

At the time of App Installation, App will request this permission set to be granted and that we will see few steps down the line.

9

Now the very next thing is to investigate the constitution of Remote Web Project “PH-AppEventLifeCycleWeb

10

In this Project we have following important Files to look for:

  • Default.aspx: This is the start page for Provided Hosted App as we set it in earlier steps. In this page we can perform actions that are desired for a specific task. For example we can provide UI for end users to interact with the App.

In this demo the code sample is reading the title of the Hosting Web as follows:

           Steps 1: Getting URL of the Host Web by reading “SPHostUrl” Parameter

           Steps 2: Instantiating Client Context by Calling GetS2SClientContextWithWindowsIdentity method provided by SharePoint Infrastructure by means of TokenHelper.cs Class

           Step 3: Once Client Context is Instantiated, we can make use of Managed CSOM to load the Web and read its Title Property as shown below

11

  • Scripts: We can go with the default set of scripts added during creation of the project, else we can add any desired script file to it

12

  • AppEventReceiver.svc : This Service class has been added to the Project as soon as you add a “Remote Event Receiver” Project Item to the Project

13

Let’s walkthrough through the code file and see what we got.

Step 1: Add “Microsoft.SharePoint.Client.EventReceivers” Namespace which is needed for Remote Service to handle Remote Events and inherit the class from “IRemoteEventService”

Step 2: Override the method ProcessEvent

Step 3: Specify Remote Event Service Status if you want to continue or reject, so that execution succeed or revert back

Step 4: Perform actions as per the business requirement. Here I am adding logs to Windows Event Log

Step 5: Return the Event Result back to SharePoint

14

Step 1: Override the method ProcessOneWayEvent

Step 2: Perform actions as per the business requirement. Here I am adding logs to Windows Event Log

15

  • Web.config: In Web.config file, there are a couple of “AppSettings” that are important to take note of-

              ClientId: Generated Automatically by Visual Studio for development perspective. At the time of App registration this can be regenerated and used accordingly.

              ClientSigningCertificatePath: Specify the path of Client Certificate exported during environment configuration.

              ClientSigningCertificatePassword: Specify the path of Client Certificate Password specified to protect the Certificate during environment configuration.

               IssuerId: Specify the path of Issuer ID generated during environment configuration

16

With this we are done with inspection to all of the important files in our solution.

Now it is time to Build the Solution and Run it.

In the below screen shot we can see the Client ID is generated by Visual Studio Tools during Build Process.

17

Once the Solution Build & Run successfully, the App Framework looks for the AppManifest.xml and find a permission set to be granted by App User on the Host Web.

So we have to grant permissions as specified in Permissions Tab of AppManifest.xml file and in order to grant the permissions click “Trust It”.

18

As soon as we grant the permissions, App Launcher looks for the App Start Page as specified in General Tab of AppManifest.xml file and Redirect the user to that page.

If we notice the URL in below screen shot, we find the App Start Page is default.aspx of Remote Web as specified in AppManifest.xml file for the App.

19

If we investigate the Site Structure using any tool like SharePoint Manager (one of my favorites), we can see an App Web by the name “PH-AppEventLifeCycle” is also provisioned due to the presence of Dummy Module we added to the Project earlier.

20

After App is getting installed successfully, we can also see an event log is added to the Windows Application Log as shown below based on the message we placed in the “AppEventReceiver.svc” code file:

21

Likewise while the App is uninstalling, we can see an event log is added to the Windows Application Log as shown below based on the message we placed in the “AppEventReceiver.svc” code file:

22

This simple walkthrough can help you to understand on how to deal with the App Events.

We can utilize these semantics under different business cases liking registering Event Receivers for existing lists or notifying users and so on.

Hope you find it helpful.

See you all in the next post of this series.:)


by Prashant Bansal via Everyone's Blog Posts - SharePoint Community

SharePoint 2013: Remote Event Receivers

In this first article on “Remote Event Receivers”, we will understand the concept of “Remote Events” & “Remote Event Handlers” which is a newly introduced concept in SharePoint 2013.

What are Remote Events & Remote Event Receivers?

Remote Events are meant to be considered in context of SharePoint Apps only, since the newly introduced SharePoint Apps Model has got restrictions on how the code should be executed in SharePoint Environment.

SharePoint Apps Model restricts the Apps to execute any server side code within SharePoint execution boundaries. But there are scenarios where it becomes really necessary to handle certain Events during the App Life Cycle.

For instance this is an obvious scenario to perform any desired operation like “creating a Global Settings List in Host Web” during App Installation, similarly it is also a valid scenarios where an Email notification needs to send to the App Users with some of the relevant information regarding the app or taking backup of the App Data or Settings on to the Host Web before actually removing the App during App Uninstallation.

Due to such valid business cases, it is necessary to have a mechanism to handle such events from within the Apps and that’s where Remote Event Handler comes into play.

There are broadly two types of Remote Events most likely to be triggered out of an App:

  1. App Events
    • Handle App Installed
    • Handle App Uninstalling
    • Handle App Upgraded

1

  1. List Events : All list events are supported which are kept within SPRemoteEventType enumeration
    • ItemAdding
    • ItemUpdating
    • ItemDeleting
    • ItemCheckingIn
    • ItemCheckingOut
    • ItemUncheckingOut
    • ItemAttachmentAdding

2

The listed events are just a few out of the complete list of Events that are exposed as Remote Events.

For the complete list of Remote Events you can visit SPRemoteEventType Enumeration.

In order to handle all of the above listed Events SharePoint provides following two Handler functions via an Interface “IRemoteEventService”:

3

  1. ProcessEvent: This is “Before or Synchronous” Handler, which executes before any action (like List Item Added/Updated/Deleted) takes place. This is a Two-Way Event Receivers which means it takes instructions from SharePoint based on User Actions (List Items Added/Deleted), Process it and returns back the result to SharePoint. This function has a return type of type “SPRemoteEventResult”.

4

  1. ProcessOneWayEvent: This is “After or Asynchronous” Handler, which executes after any action (like List Item Added/Updated/Deleted) completed. This is not a Two-Way Handler so it will just accept the instructions from SharePoint based on User Actions (List Items Added/Deleted) and does not returns back any result or notification to SharePoint. This function should be mainly employed for operations like Logging, Sending Notifications to App Users and so on.

5

How do Remote Event Receiver Works:

Step1: User Performs Operations that generates an event in SharePoint [Be it App or List Events]

Step2: SharePoint then look for registered Web Service Endpoint designated to handle this event remotely

Step3: Web Service Endpoint process the instructions based on the Event generated from within SharePoint and returns the result back to SharePoint.

In order to perform any action directly from within the Web Service, Web Service Endpoint needs to call Access Control Service to obtain its own signed token.

6

SharePoint provides the TokenHelper.cs Class file which can be used to make request for necessary tokens.

7

That is all for this post on Remote Even Receivers.

Hope you will find it helpful.

In the upcoming articles on Remote Event Receivers we will explore the implementation details and see each of the types of Events Receivers in action.

So sit tight and stay tuned.:)


by Prashant Bansal via Everyone's Blog Posts - SharePoint Community

The Future of SharePoint Summarised

New SharePoint sites with modernised team site experience, with an engaging home page personalised by the intelligence of Office Graph.

A revitalised libraries and lists enable immediate productivity with an intuitive user experience and provide rich metadata, content management and functionality.

Bringing the power of SharePoint team sites and Office 365 Groups together, giving every group a team site, and giving team sites the benefit of groups for simple management of membership across Office 365 services.

Microsoft Flow was announced as a new service for automating workflow across the growing number of apps and SaaS services.

SharePoint mobile app, designed for Windows, iOS and Android, to put your intranet in your pocket, with full-fidelity access to company news and announcements, people, sites, content and apps — no matter where you are.

New tools to discover and protect content with data loss protection (DLP) policies, both in Office 365 and in SharePoint Server 2016.

SharePoint Insights, a service which aggregates usage and compliance data from on-premises and cloud into the Office 365 Reporting Centre, so you can get a unified view across your entire organisation.

And of course SharePoint 2016 is out with further releases to come. SharePoint designer will work with the new version.

The InfoPath 2013 remains the last version to be released and will work with new version.

  • The InfoPath 2013 client will be supported through April 2023.
  • InfoPath Forms Services for SharePoint Server 2013 will be supported until April 2023.
  • InfoPath Forms Services in Office 365 will be supported until further notice.

by Larry Saytee via Everyone's Blog Posts - SharePoint Community

The Future of SharePoint Summarised

New SharePoint sites with modernised team site experience, with an engaging home page personalised by the intelligence of Office Graph.

A revitalised libraries and lists enable immediate productivity with an intuitive user experience and provide rich metadata, content management and functionality.

Bringing the power of SharePoint team sites and Office 365 Groups together, giving every group a team site, and giving team sites the benefit of groups for simple management of membership across Office 365 services.

Microsoft Flow was announced as a new service for automating workflow across the growing number of apps and SaaS services.

SharePoint mobile app, designed for Windows, iOS and Android, to put your intranet in your pocket, with full-fidelity access to company news and announcements, people, sites, content and apps — no matter where you are.

New tools to discover and protect content with data loss protection (DLP) policies, both in Office 365 and in SharePoint Server 2016.

SharePoint Insights, a service which aggregates usage and compliance data from on-premises and cloud into the Office 365 Reporting Centre, so you can get a unified view across your entire organisation.

And of course SharePoint 2016 is out with further releases to come. SharePoint designer will work with the new version.

The InfoPath 2013 remains the last version to be released and will work with new version.

  • The InfoPath 2013 client will be supported through April 2023.
  • InfoPath Forms Services for SharePoint Server 2013 will be supported until April 2023.
  • InfoPath Forms Services in Office 365 will be supported until further notice.

by Larry Saytee via Everyone's Blog Posts - SharePoint Community

Friday, May 13, 2016

Azure Resource Manager - Part 8 - Export Template for Resources in a Resource Group with the REST API

Background

Azure Resource Manager - Part 8 - Export Template for Resources in a Resource Group with the REST API

This blog post will be about how to in the easiest way possible (well, as a developer anyway) export a JSON template from the Azure Resource Manager.

If you're using the ARM (Azure Resource Manager) just like me and you aare automating a lot of tasks and deployments - one thing that sometimes happen is that a resource group deviates from the original template after being modified or additional resources were added manually, or any other valid approach that happens in the real world (even if they're not always ideal).

Falling in line with this blog series, I'll show you how easy it is to get the full JSON template of your deployed resources by using the Azure Resource Manager REST API.

Use the Azure Resource Manager REST Api to Export Template for your resources

The following steps will assume that you're already familiar with running REST queries with the ARM.

If you're looking for the basics of getting started, please check out the other posts in this article series. Start here.

So pose that I have a Resource Group called Bots (because I do, and they're awesome). This Resource Group contains only three simple resources for this demo showcase, which are:

  • zimmer-slack-bot-demo: Application Insights
  • SkynetServicePlan: The App Service Plan
  • zimmer-slack-bot-demo: Web App

Azure Resource Manager - Part 8 - Export Template for Resources in a Resource Group with the REST API

Check out how we can generate a template for re-use.

The POST Request

The POST request is simple, as always. You only need to target your Resource Group, and then append /exportTemplate in order to send the request for getting the json formatted template.

POST http://ift.tt/1X7nDo7  

The JSON Response

Once the POST request has been sent, and you get the generated results back (the request could take a few microsoft moments if you have a lot of resources), you'll receive a JSON template back fully automated and ready to be re-used and re-deployed wherever you want.

{
  "template": {
    "$schema": "http://ift.tt/1FoTGD1",
    "contentVersion": "1.0.0.0",
    "parameters": {
      "components_zimmer_slack_bot_demo_name": {
        "defaultValue": "zimmer-slack-bot-demo",
        "type": "String"
      },
      "serverfarms_SkynetServicePlan_name": {
        "defaultValue": "SkynetServicePlan",
        "type": "String"
      },
      "sites_zimmer_slack_bot_demo_name": {
        "defaultValue": "zimmer-slack-bot-demo",
        "type": "String"
      }
    },
    "variables": {},
    "resources": [
      {
        "comments": "Generalized from resource: '/subscriptions/b67713f0-97f6-4565-90a0-2dcae01a59ae/resourceGroups/Bots/providers/microsoft.insights/components/zimmer-slack-bot-demo'.",
        "type": "microsoft.insights/components",
        "kind": "web",
        "name": "[parameters('components_zimmer_slack_bot_demo_name')]",
        "apiVersion": "2014-04-01",
        "location": "Central US",
        "tags": {
          "hidden-link:/subscriptions/b67713f0-97f6-4565-90a0-2dcae01a59ae/resourceGroups/Bots/providers/Microsoft.Web/sites/zimmer-slack-bot-demo": "Resource"
        },
        "properties": {
          "ApplicationId": "[parameters('components_zimmer_slack_bot_demo_name')]"
        },
        "dependsOn": []
      },
      {
        "comments": "Generalized from resource: '/subscriptions/b67713f0-97f6-4565-90a0-2dcae01a59ae/resourceGroups/Bots/providers/http://ift.tt/1X7nDo9'.",
        "type": "http://ift.tt/1JAmBbM",
        "sku": {
          "name": "S1",
          "tier": "Standard",
          "size": "S1",
          "family": "S",
          "capacity": 1
        },
        "name": "[parameters('serverfarms_SkynetServicePlan_name')]",
        "apiVersion": "2015-08-01",
        "location": "North Europe",
        "properties": {
          "name": "[parameters('serverfarms_SkynetServicePlan_name')]",
          "numberOfWorkers": 1
        },
        "dependsOn": []
      },
      {
        "comments": "Generalized from resource: '/subscriptions/b67713f0-97f6-4565-90a0-2dcae01a59ae/resourceGroups/Bots/providers/http://ift.tt/1s6tEpm'.",
        "type": "Microsoft.Web/sites",
        "name": "[parameters('sites_zimmer_slack_bot_demo_name')]",
        "apiVersion": "2015-08-01",
        "location": "North Europe",
        "tags": {
          "hidden-related:/subscriptions/b67713f0-97f6-4565-90a0-2dcae01a59ae/resourcegroups/Bots/providers/Microsoft.Web/serverfarms/SkynetServicePlan": "empty"
        },
        "properties": {
          "name": "[parameters('sites_zimmer_slack_bot_demo_name')]",
          "hostNames": [
            "zimmer-slack-bot-demo.azurewebsites.net"
          ],
          "enabledHostNames": [
            "zimmer-slack-bot-demo.azurewebsites.net",
            "zimmer-slack-bot-demo.scm.azurewebsites.net"
          ],
          "hostNameSslStates": [
            {
              "name": "[concat(parameters('sites_zimmer_slack_bot_demo_name'),'.azurewebsites.net')]",
              "sslState": 0,
              "thumbprint": null,
              "ipBasedSslState": 0
            },
            {
              "name": "[concat(parameters('sites_zimmer_slack_bot_demo_name'),'.scm.azurewebsites.net')]",
              "sslState": 0,
              "thumbprint": null,
              "ipBasedSslState": 0
            }
          ],
          "serverFarmId": "[resourceId('http://ift.tt/1JAmBbM', parameters('serverfarms_SkynetServicePlan_name'))]"
        },
        "dependsOn": [
          "[resourceId('http://ift.tt/1JAmBbM', parameters('serverfarms_SkynetServicePlan_name'))]"
        ]
      }
    ]
  }
}

Summary

With little effort we have now exported our JSON template for this entire resource group. This can be a key to success when talking about automation and deployments. I am using this regularly to see how my deployed resources differ from the templates I have in my repositories. Or even better, if you want to design a new template by creating resources in Azure - you can configure them through the portal easily until you're happy, then just run the exportTemplate POST request and you're good to go with a fresh template which is automatically generated based off of your resources.


by Tobias Zimmergren via Zimmergren's thoughts on tech

Thursday, May 12, 2016

Creating a SharePoint 2016 External Content Type trough OData in VS 2015 with EF6

A few weeks ago, I started playing with Hybrid SharePoint Server 2016 scenarios, to see if there are any differences with SharePoint 2013. As I am mostly an IT Pro, usually I never did the OData Source myself, but had a developer set that up for me. This time, I was in my lab, and I was both the DEV and the SharePoint Admin that had to do the IT part. (Talk about DevOps). That and the fact that I had quite a lot of problems with getting it to work with Entity Framework 6, I decided to do a blog post for all the SharePoint Admins and Developers out there that want to create a SharePoint 2016 External Content Type with an OData Source.

This blog will really be a step by step that everyone could follow, so if you are a more experienced dev, you can probably skip most of the screenshots, but I am sure that if you’re an IT Pro and first time doing this, you will find it valuable.

Intro

Our Goal for this blog post is to get the following table, in SharePoint Server 2016. The Hybrid configuration will be done in another blog post, for this one, we simply want to make it work in SharePoint 2016 On-Premises.

You will need to have access to a SharePoint Development machine with Visual Studio, as well as a IIS server where you can deploy your WebService at after (This can be done on the SharePoint Server).

Note, and this one is especially for people (like me) who will simply do this for testing. You need to have a Primary Key in your table for this to work. Without a Primary Key, you will get strange errors. For production, I hope this will not be a problem, but if you create a quick Database for testing, make sure your table has a PK defined.

Creating the OData Source

Create a new Project of type ASP.NET Web Application and name it as you wish. (For this scenario, we disabled the checkbox for Application Insights , since we don’t want to use /configure it).

Creating a SharePoint 2016 External Content Type trough OData in VS 2015 with EF6

In the next page, select Empty, since we want an Empty Web Application where we will add our own stuff.

Creating a SharePoint 2016 External Content Type trough OData in VS 2015 with EF6

Now, we will need to start adding items in this Project, so right click on the project name, Add, and Add New Item.

Select ADO.Net Entity Data Model under the Data tab, and give it a proper name such as “ContosoModel”

In the Entity Data Model Wizard, choose EF Designer from Database.

Creating a SharePoint 2016 External Content Type trough OData in VS 2015 with EF6

On the “Choose your Data Connection” page, click on “New Connection”

Enter the Connection Information for your business needs. If you use Windows Authentication, it will use the account that the Application Pool you run your Web Services Site runs it to access the Database. (Once deployed). There are multiple other ways to configure it depending on your business needs, but for this demo, we will use Windows Authentication.

Creating a SharePoint 2016 External Content Type trough OData in VS 2015 with EF6

After you configure it, click on Test Connection to make sure that everything is configured correctly.

Back to the “Choose Your Data Connection” Page, you will have your connection selected, and you can optionally change the connection setting in the Web Config.

Creating a SharePoint 2016 External Content Type trough OData in VS 2015 with EF6

Choose Entity Framework 6.x so we use the latest version available for our project.

On the next page, choose all the tables that you want included in the OData Service and give a good name to your Model Namespace.

If everything worked correctly, you will see a next page, with the columns of your table(s) in a designer. If you don’t, check out the error log at the bottom of your Visual Studio

After this is done, we need to add another item to our Project!

Creating a SharePoint 2016 External Content Type trough OData in VS 2015 with EF6

This one is the WCF Data Service, which should be under the Web Tab. Make sure to give it a proper name.

A page will appear, mostly Pre-populated

And here is where it gets a bit tricky. The first thing we have to do is replace the “public
class
WcfDataService1 : DataService< /* TODO: put your data source class name here */ >

Where we will have to replace it with DataService<
ContosoEntities> . (The connection string we created in Web.Config when creating our connection earlier). However, this will fail. The reason is that, Visual Studio wrongly defaults to using “DataService”, when this will not work with Entity Framework 6. We will need to make some changes!

In the Top Bar, under Tools > NuGet Package Manager, open the Package Manager Console

In the Console, run the following command to get the Entity Framework Provider Package “Install-Package Microsoft.OData.EntityFrameworkProvider –Pre”. It should successfully install as seen in the following screenshot.

At the top of your file, add the “using System.Data.Services.Providers; line to load the proper classes.

A bit lower in the file, change the DataService<ConnectionStringName> to EntityFrameworkDataService<ContosoEntities> (Where ContosoEntities, is the connection string name you defined earlier in this blog post)

Lower again, in this example, I used the “UserVerboseErros = true”, for debugging, but you can delete that line for production. More important, make sure to do a config.SetEntityAccesRules(“TableName”) EntitySetRights.(rights); . In my case, I gave them AllRead.

The Project is now ready, so I created a IIS Site called WebServices, as well as an Application called Contoso.

From Visual Studio, Click on “Publish ProjectName”

From now on, the procedure might vary depending on where you’re publishing your project to. The screenshots I will put here are for deploying on localhost. On the First Page, select “Custom”

Enter a Profile Name for this custom Profile

Enter the Server where you wish to deploy it (in my case localhost) and the Site name in format IISSiteName\ApplicationName

Also enter what the destination name will be, depending on the bindings you use on your IIS Site. Once you click on Validate Connection, you should see a green checkbox that appears near the button.

In the Database, select the available Connection String.

On the next page, you will see the items that will be deployed, and since it’s a new deployment we will see a bunch of them. Simply click on Publish and it should only take a few seconds.

If Everything works correctly, You should be able to navigate to the URL where you deployed your webservice /Servicename.svc and see something similar to this. An XML with your tables inside!

Next step, is to go to webservice/http://ift.tt/1NrPEVC (Tablename IS Case Sensitive!) For example. http://ift.tt/1qgf4KQ . The result will depend on the browser. On IE you will see a RSS Feed Screen, with as you see, 6 results, but we can’t see the results.

On Chrome, you will see an XML, and if you look closely, you will actually see the customer data in there!

Cool , so our OData Service works, and is able to show data from the SQL Database in the Browser. You can now close that Visual Studio solution, and start a new one! This time, is of type “SharePoint Add-in”. And don’t worry, we will not actually deploy it, so you don’t need to have Add-ins Configured for this to work. You will however need a Dev Site Collection!

Enter the URL of your Dev Debugging Site, and then SharePoint-Hosted.

For the API version, I will select SharePoint 2016, since that’s where I want to deploy this Add-in

We will now need to add a New Item, Content Type for an External Data Source. And strangely, this is not in the “New Item” pop up as before, but directly on the Add!

For the OData Service URl, enter the URL to your Service, and give it a name!

Select the Table(s) on which you want to create External Content Types and make sure to leave the checkbox at the bottom checked.

After this is done, you should have two .ECT files in your Project.

Open the ECT file with the built in XML text editor in Visual Studio

In the top of the document, within the Model element, you will see a Name attribute. This Name attribute is the name you selected when you connected to the OData source, such as NorthwindCustomersModel. The value of this name is the same in all of the ECT files created from the entities, but it has to be unique in order to use it in SharePoint. You will need to change the name based on the ECT you are using , for example CustomersTable

Now, navigate to your project, copy this ECT File to somewhere on your desktop

You can then go into Central Admin, BCS Service Application and upload the ECT File. Also, If you didn’t already do it, make sure you have set the permissions!

Afterwards, make sure to use “Set Metadata Store”, to give it the required permissions

After that is done, go to any Site Collection, and add an “External List”

Select your External Content Type

And everything should work!

You now managed to show data in SharePoint, by using Business Connectivity Services consuming an OData Source! If you want to configure Hybrid BCS , you will need to follow a future blog post that will start from this point. I will link to it once it’s live!

The post Creating a SharePoint 2016 External Content Type trough OData in VS 2015 with EF6 appeared first on Absolute SharePoint Blog by Vlad Catrinescu.


by Vlad Catrinescu via Absolute SharePoint Blog by Vlad Catrinescu