Configure Tfs OData Services

Team Foundation Server 2010 and 2012 can be configured to support the TFS OData Services. By default, the only supported connectivity to TFS is through the client object model. This is essentially a wrapper around that API. Follow these steps to configure TFS OData Services for your on-premises TFS implementation.
Download the OData Service for Team Foundation Server v2 and run the executable to unpack the files to a local folder. The folder contains a readme document that is also helpful for installing and includes steps for optionally installing this service in Azure.

Open the ODataTFS Solution in the Code folder.

From the ODataTFS.Web project, open the Web.config file to set the TFS Connection. Modfiy the ODataTFS.TfsServer appSetting to point to your TFS Server.

TFS OData Service uses basic authentication to pass the username and password to the TFS Server. This passes those values as plain text so it is highly encouraged to use HTTPS. The remaining steps assume you are configuring this to use HTTPS. If you are not or want to use it for testing. Change the Transport security to TransportCredentialOnly.

To test locally, single click on the project to verify SSL settings are enabled and copy the SSL URL value to the clipboard and paste it into the Project URL setting in the ODataTFS.Web project properties.

Run the project. It will launch IE and prompt you to continue past the invalid SSL. Click continue and the TFS OData page will display. If you scroll half way down you will see several queries you can run. Test returning a list of work items.

Update the URL to something similar to the following: https://localhost:44301/DefaultCollection/WorkItems. Adjust accourdingly if your collection name, server name, or port is different. This should display a list of work items in a format similar to a RSS/ATOM feed.

Now that you have it running locally, deploy it to any IIS server in your network or again you can host this in Azure (see readme documention included with OData Service for TFS v2 download). Create a website, specify a local folder, set the SSL to the appropriate server. Make sure to configure a trusted SSL certificate or TFS Agile Poker will return an error. Ensure the application pool that this service is going to be used is set to use .Net 4.0 framework.