<br><b>Code</b>: rsb:print<br><b>Error</b>: Formatter [ extable ] failed in the evaluation of ???????????????????????[datasource] ?????????????????????????????OData ???????????????????????????API Server ?[service] ?OData ????? </p> <p> After setting up the API Server, creating an external list with connectivity to [datasource] consists of three basic steps: </p> <ol> <li><a href="#ect">Create the External Content Type</a> <li><a href="#import">Import the External Content Type</a> <li><a href="#create">Create the External List</a> </ol> <p> This article also covers how to accomplish the following tasks: </p> <ul> <li><a href="#limit">Limit Results</a> <li><a href="#passthrough">Configure Pass-Through Authentication</a> <li><a href="#credentials">Configure Credentials Authentication</a> </ul> <h2 id="setup">Set Up the API Server</h2> <p> Follow the steps below to begin producing secure [service] OData services: </p> <h3>Deploy</h3> <p> The API Server runs on your own server. On Windows, you can deploy using the stand-alone server or IIS. On a Java servlet container, drop in the API Server WAR file. See the help documentation for more information and how-tos. </p> <p> The API Server is also easy to deploy on <a href="[x|UrlRootAbs]/kb/articles/odata-azure.rst">Microsoft Azure</a>, <a href="[x|UrlRootAbs]/kb/articles/odata-amazon.rst">Amazon EC2</a>, and <a href="[x|UrlRootAbs]/kb/articles/odata-heroku.rst">Heroku</a>. </p> <h3>Connect to [service]</h3> <p> After you deploy the API Server and the <a href="[x|UrlRootAbs]/drivers/[id]/download/ado">ADO.NET Provider for [service]</a>, provide authentication values and other connection properties needed to connect to [service] by clicking Settings -> Connections and adding a new connection in the API Server administration console. </p> [extraconnectionnotescloud|def('[extraconnectionnotes|def("")]')] <p> SharePoint consumes OData 3.0 data sources. You can configure the API Server for compatibility with SharePoint by clicking Settings -> Server and then selecting OData 3.0 in the Default OData Version menu. </p> <p> You can then choose the [service] entities you want to allow the API Server to access by clicking Settings -> Resources. </p> <h3>Authorize API Server Users</h3> <p> After determining the OData services you want to produce, authorize users by clicking Settings -> Users. The API Server uses authtoken-based authentication and supports the major authentication schemes. Access can also be restricted based on IP address; by default only connections to the local machine are allowed. You can authenticate as well as encrypt connections with SSL. </p> <h2 id='ect'>Create the External Content Type</h2> <p> The external content type is a schema that will provide the core connectivity to [datasource] from any SharePoint app. You can create a schema for any OData query. You can pass in the required options with the <tt>$sharepoint</tt> query string parameter. Below is an example request, which will return the schema in an .ect file: </p> <code> https://my-server:8032/api.rsc/[extable]?$sharepoint=AuthMode:Passthrough&@authtoken=my-authtoken </code> <p> Note that for simplicity, the authtoken is passed in the query string to authenticate the request for the .ect. This is not enabled by default; if you would like to use this method to authenticate to the API Server, you will need to add an entry like the following to your settings.cfg file: </p> <code> \[Application] AllowAuthtokenInUrl = true </code> <p> The settings.cfg file is located in the data directory. In the .NET edition, the data directory is located in the app_data subfolder of the application root. In the Java edition, the location of the data directory depends on your operating system: </p> <ul> <li>Windows: C:\ProgramData\\[company_name] <li>Unix or Mac OS X: ~/[company_name|tolower] </ul> <h2 id="import">Import the External Content Type</h2> <p> After you have created the .ect, you can follow the steps below to import it into SharePoint Online or an on-premise SharePoint installation. </p> <h3>SharePoint 2013</h2> <p> Navigate to the SharePoint central administration portal and click the link to manage service applications. In the resulting page, click Business Data Connectivity Service. Select External Content Types in the menu and click Import. In the BDC Model section, click Choose File to select the .ect file in the dialog. </p> <h3>SharePoint Online</h3> <p> In the SharePoint admin center, click BCS from the quick launch menu and then click Manage BDC Models and External Content Types. On the resulting page, select External Content Types in the menu and click Import. In the BDC Model section, click Choose File. </p> <h2 id="create">Create the External List</h2> <p> You can now create SharePoint apps that can access and modify [datasource]: </p> <ol> <li> Navigate to your SharePoint site and choose Site Contents -> Add an App -> External List. <li>Click the Select External Content Type icon and choose the external content type that you created in the previous section. <li>Click Create. </ol> <img src="[x|UrlRootAbs]/kb/articles/apps-getsharepointschema-1.png" title="The external list. (Salesforce with SharePoint 2013 is shown.)"/> <h2 id="limit">Limit Results</h2> <p> SharePoint has limits on how much data can be retrieved from external lists of OData sources. External lists display results in pages of 30 items by default. To modify the paging size, you can set the Item Limit property in the settings for the default view. Alternatively, you can build a custom Web part to view the data from the external list. </p> <p> In SharePoint 2013, requests to external data sources are limited by bandwidth throttling controls, which can be changed using the Set-SPBusinessDataCatalogThrottleConfig command. In SharePoint Online, requests to external data sources are limited by your Server Resource Quota and by bandwidth throttling controls; to work around this, you can apply filters in the request for data. </p> <p> The API Server sets the default limit for the number of returned rows to be 500. You can disable this limit by adding the limit option to the $sharepoint query string parameter and setting its value to 0. </p> <h2 id="passthrough">Configure Pass-Through Authentication</h2> <p> To use pass-through authentication for accessing your external content type, set the AuthMode option to pass-through. </p> <p> If you are using Kerberos authentication, you need to add these users to the API Server. If you are not using Kerberos authentication, you are likely using another form of Windows authentication such as NTLM. </p> <p> When users are authenticating via NTLM authentication and using pass-through authentication in the Business Connectivity Service (BCS) in SharePoint, SharePoint connects to the external Web service using the default IIS account. This account is often the <i>NT AUTHORITY\IUSR</i> account. Give this user access to the [company_name] API Server. </p> <p> See the help documentation for a guide to enabling Windows authentication for the API Server. </p> <h2 id="credentials">Configure Credentials Authentication</h2> <p> In the following sections, you will first create a secure store target application that authenticates SharePoint users to the API Server with the credentials for a user who has been added to the API Server. Next, you will create the external content type and configure it to authenticate with the credentials in the secure store. </p> <ul> <li><a href="#credonline">SharePoint Online</a></li> <li><a href="#cred2013">SharePoint 2013</a></li> </ul> <h3 id="credonline">SharePoint Online</h3> <ol> <li>In the SharePoint Online administration center, click secure store from the quick launch bar and then click New. <li>In the Target Application Settings section, enter the target application Id, display name, and contact email. <li>In the Credential Fields section, add the credentials for a user in the API Server. <li>In the Target Application Administrators section, choose an administrator who can access the connection settings for the external content type. The account for the SharePoint Online administrator is usually specified here. </li> <li>In the Members section, enter the users in SharePoint who are authorized to access [datasource]. <img src="[x|UrlRootAbs]/kb/articles/apps-getsharepointschema-2.png" title="The configuration page for the new target application in SharePoint Online. (Salesforce is shown.)"/> </li> </ol> <p> After you create the target application, save the credentials of The API Server user into the secure store: </p> <ol> <li>In the quick launch bar, click secure store. <li>Click Set Credentials in the menu for the target application. <li>Enter the username and password of a user in the API Server. </li> </ol> <p> Next, create a new connection settings object: </p> <ol> <li> Click BCS from the quick launch bar and then choose the option to manage connections to online services. <li>Click Add. Name the connection and enter the URL of the OData endpoint, https://my-server/api.rsc. <li>Select the option to use credentials stored in SharePoint. Enter the application Id for the target application you created. </ol> <p> Finally, create the external content type, import it into SharePoint Online, and create the external list: </p> <ol> <li> Generate the external content type by making a request for data and specifying the required options in the $sharepoint query string parameter. Set the AuthMode option to Credentials. Specify the target application Id and the Id of the connection settings object. For example: </p> <code> https://my-server/api.rsc/[extable]?$filter=[exselectwherecol] eq '[exselectwherecolequals]'&$sharepoint=AuthMode:Credentials,TargetApplicationId:my-target-application-Id,ODataConnectionSettingsId:my-odata-connection-settings-Id </code> </li> <li> Import the resulting .ect file: Open BCS from the quick launch bar and click the link to manage BDC models and external content types. Click Import. </li> <li>You can now create the external list. </ol> <h3 id="cred2013">SharePoint 2013</h3> <ol> <li> Browse to the central administration area for your SharePoint site and click the link to manage service applications. </li> <li> Click Secure Store Service and then click New. </li> <li> Enter the application Id, display name, and contact email to configure the new secure store target application. Set the target application type to Group. <img src="[x|UrlRootAbs]/kb/articles/apps-sharepoint-external-list-4.png" title="Creating a new target application in SharePoint 2013. (Salesforce is shown.)"/> </li> <li> On the next page, add the field names and field types to display when the user enters their username and password. Select the username and password field types. <img src="[x|UrlRootAbs]/kb/articles/apps-sharepoint-external-list-5.png" title="The type of authentication used for the API Server."/> </li> <li> Next, in the Target Application Administrators section, choose administrators who are authorized to access connection settings for the external content type. In the Members section, enter the users in SharePoint who are authorized to connect with the credentials of the API Server user. <img src="[x|UrlRootAbs]/kb/articles/apps-sharepoint-external-list-6.png" title="Administrators of the external content type and SharePoint users who are authorized to use the API Server."/> </li> </ol> <p> After you create the new secure store target application, follow the procedure below to set the credentials that users in SharePoint will provide when accessing the API Server: </p> <ol> <li> Click Set Credentials in the menu for the target application. <img src="[x|UrlRootAbs]/kb/articles/apps-getsharepointschema-6.png" title="The first step to save credentials to the API Server in the secure store. (Salesforce is shown.)"/> </li> <li> In the resulting menu enter the username and password (authtoken) of a user in the API Server. <img src="[x|UrlRootAbs]/kb/articles/apps-getsharepointschema-7.png" title="The credentials of a user in the API Server. (Salesforce is shown.)"/> </li> <li> <p> Open an instance of the SharePoint management shell and initialize a new SharePoint connection object. Note that the connection object is site specific. </p> <code>New-SPODataConnectionSetting -AuthenticationMode Credentials -ServiceAddressURL http://my-server/api.rsc -ServiceContext http://myspsite/ -Name MyODataConnectionSettingsId -SecureStoreTargetApplicationId my-target-application-Id </code> <p> </p> <p>The output below shows that the command has executed successfully: </p> <img src="[x|UrlRootAbs]/kb/articles/apps-getsharepointschema-8.png" title="The initialized connection object."/> </li> </ol> <p> The final steps involve creating the external content type for the table you want to expose in SharePoint, configuring it to authenticate with credentials from the secure store, and then importing it into SharePoint. </p> <ol> <li>Generate the external content type by making a request for data and specifying the required options in the $sharepoint query string parameter: Below is an example request: </p> <code> http://my-server/api.rsc/Account?$filter=Industry eq 'Floppy Disks'&$sharepoint=AuthMode:Credentials,TargetApplicationId:my-target-application-Id,ODataConnectionSettingsId:my-odata-connection-settings-Id </code> <li id="importingectfile"> To import the external content type into SharePoint, point your browser to the SharePoint central administration portal and click the link to manage service applications. </li> <li> Click Business Data Connectivity Service in the resulting page. <li>Click Import and select the .ect file in the dialog. </li> <li> You can now create the external list. On the Site Contents page on your SharePoint site, click the button to add an app and then click the icon to choose the external content type. </li> </ol>. The error was: The value of the attribute could not be accessed: The attribute does not exist.<br><b>URL</b>: /jp/kb/tech/qoo10-odata-sharepoint-external-list.rst