<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Project Programmability and Business Intelligence</title><link>http://blogs.msdn.com/b/project_programmability/</link><description>This blog focuses on customizations and programming for Project Web App, Project Server, Project Professional and Project Standard. Includes User Interface (UI) customizations, Project Server Interface (PSI) and Visual Basic for Applications (VBA) Programm</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>March 2013 update of the Project 2013 SDK download file</title><link>http://blogs.msdn.com/b/project_programmability/archive/2013/03/19/march-2013-update-of-the-project-2013-sdk-download-file.aspx</link><pubDate>Tue, 19 Mar 2013 17:42:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10403579</guid><dc:creator>Jim  Corbin</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/project_programmability/rsscomments.aspx?WeblogPostID=10403579</wfw:commentRss><comments>http://blogs.msdn.com/b/project_programmability/archive/2013/03/19/march-2013-update-of-the-project-2013-sdk-download-file.aspx#comments</comments><description>&lt;p&gt;The &lt;a href="https://www.microsoft.com/en-us/download/details.aspx?id=30435"&gt;Project 2013 SDK download &lt;/a&gt;is updated. The conceptual, how-to, and reference documentation in the download closely matches the &lt;a href="http://msdn.microsoft.com/en-us/library/ms512767(office.15).aspx"&gt;Project 2013 developer documentation&lt;/a&gt; online content published on MSDN.&lt;/p&gt;
&lt;p&gt;The Project2013SDK.msi download file now installs properly on Windows 8 and Windows Server 2012.&lt;/p&gt;
&lt;p&gt;The Project 2013 SDK download contains:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The on-premises Reporting database schema reference&lt;em&gt;, &lt;/em&gt;&lt;em&gt;ProjectServer2013_ReportingDB.chm&lt;/em&gt;, and the OLAP cube schema reference.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Updated VBA Help for local use. Objects such as &lt;strong&gt;Chart&lt;/strong&gt;, &lt;strong&gt;Report&lt;/strong&gt;, &lt;strong&gt;Series&lt;/strong&gt;, and &lt;strong&gt;Shape &lt;/strong&gt;now show correct members tables, properties, and methods topics.&lt;/li&gt;
&lt;li&gt;Basic reference topics for the JavaScript client-side object model (JSOM), which includes REST endpoints and HTTP request syntax. You can use the JSOM for development of Project Online solutions for cross-browser web apps and for non-Windows platforms.&lt;/li&gt;
&lt;li&gt;Sixteen complete code solutions, including two task pane apps (with minor updates) for Project, the QuickStatus app sample for Project Server and Project Online, eight client-side object model (CSOM) solutions, two solutions for querying the &lt;strong&gt;ProjectData &lt;/strong&gt;service for reporting, and three updated legacy PSI solutions.&lt;/li&gt;
&lt;li&gt;DLLs and a license for redistribution of the Project Server CSOM assemblies, JavaScript files for the CSOM, the Microsoft.Office.Project.Server.Library assembly, and the Microsoft.Office.Project.Server.Events.Receivers library for on-premises development. &lt;br /&gt;&lt;strong&gt;Notes: &lt;/strong&gt;&amp;nbsp; 1. The attached REDIST.zip file contains the RTM build 15.0.4420.1017&amp;nbsp;of the Project Server assemblies for redistribution.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. The REDIST.zip file also includes the Microsoft.Office.Project.Schema.dll assembly, for developing event handlers.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;3. Project CSOM solutions also require the redistributable DLLs for the SharePoint 2013 CSOM,&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;which are at &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=35585" target="_blank"&gt;SharePoint Server 2013 Client Components SDK&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Updated Intellisense files for the PSI and CSOM, source code for creating a PSI proxy assembly, and instructions on how to update the PSI proxy files.&lt;/li&gt;
&lt;li&gt;XML schemas for the Project client, AppProvisioning, and the Statusing PSI.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The top-level online landing page for the Project SDK is &lt;em&gt;Project for developers &lt;/em&gt;(&lt;a href="http://msdn.microsoft.com/project"&gt;http://msdn.microsoft.com/project&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;For additional Project-related SDK content, see &lt;em&gt;Office for developers &lt;/em&gt;(&lt;a href="http://msdn.microsoft.com/office"&gt;http://msdn.microsoft.com/office&lt;/a&gt;), &lt;em&gt;SharePoint for developers &lt;/em&gt;(&lt;a href="http://msdn.microsoft.com/sharepoint"&gt;http://msdn.microsoft.com/sharepoint&lt;/a&gt;), and &lt;em&gt;Build apps for Office and SharePoint&lt;/em&gt; (&lt;a href="http://msdn.microsoft.com/office/apps/"&gt;http://msdn.microsoft.com/office/apps/&lt;/a&gt;). The two articles on &lt;a href="http://msdn.microsoft.com/en-us/library/office/apps/fp161143(v=office.15)"&gt;Task pane apps for Project&lt;/a&gt; are in the &lt;em&gt;Apps for Office and SharePoint SDK&lt;/em&gt;, and the &lt;a href="http://msdn.microsoft.com/en-us/library/office/apps/fp142185(v=office.15)"&gt;JavaScript API for Office&lt;/a&gt; reference includes information specific for Project, the &lt;strong&gt;ProjectDocument &lt;/strong&gt;object with eleven methods and three events, and four enumerations for Project.&lt;/p&gt;
&lt;p&gt;Want to try out Project 2013?&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Sign up for &lt;a href="http://www.microsoft.com/project/en-us/Preview/default.aspx"&gt;Project Online and Project Pro for Office 365&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Download &lt;a href="http://technet.microsoft.com/en-US/evalcenter/hh973401.aspx?wt.mc_id=TEC_119_1_33"&gt;Project Professional 2013&lt;/a&gt; and &lt;a href="http://technet.microsoft.com/evalcenter/hh973403"&gt;Project Server 2013&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;--Jim&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10403579" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-40-35-79/REDIST.zip" length="2124593" type="application/octet-stream" /></item><item><title>MSDN Webcast: Project 2010 JS Grid Extensibility: Project Web App</title><link>http://blogs.msdn.com/b/project_programmability/archive/2013/02/13/msdn-webcast-project-2010-js-grid-extensibility-project-web-app.aspx</link><pubDate>Wed, 13 Feb 2013 22:41:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10393529</guid><dc:creator>Jim  Corbin</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/project_programmability/rsscomments.aspx?WeblogPostID=10393529</wfw:commentRss><comments>http://blogs.msdn.com/b/project_programmability/archive/2013/02/13/msdn-webcast-project-2010-js-grid-extensibility-project-web-app.aspx#comments</comments><description>&lt;p&gt;Pat Malatack (Program Manager, Microsoft Corporation) has a comprehensive series of webcasts on extending the JS Grid in Project Web App.&lt;/p&gt;  &lt;p&gt;&lt;font color="#c0504d"&gt;&lt;strong&gt;Note:&lt;/strong&gt;&amp;#160; This blog post was originally&lt;/font&gt;&lt;font color="#c0504d"&gt; created Monday, April 19, 2010. The webcasts were missing for the past several months, but have been reinstated on the Microsoft Events site (&lt;a title="https://msevents.microsoft.com/" href="https://msevents.microsoft.com/"&gt;https://msevents.microsoft.com/&lt;/a&gt;).&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032448988&amp;amp;Culture=en-US" target="_blank"&gt;MSDN Webcast: Project 2010 JS Grid Extensibility: Project Web App (Part 1 of 3) (Level 400)&lt;/a&gt;    &lt;br /&gt; Tuesday, April 20, 2010    &lt;br /&gt; 1:00 P.M.-2:00 P.M. Pacific Time    &lt;br /&gt; This is the first webcast in a three-part series on extending grid pages in Microsoft Office Project Web App. In this webcast, we focus on initializing custom grid code and interactions between the grid and the Project Web App Ribbon. In particular, we show you how to add additional functionality to the Project Center.    &lt;br /&gt;&amp;#160; &lt;br /&gt;&lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032448997&amp;amp;Culture=en-US" target="_blank"&gt;MSDN Webcast: Project 2010 JS Grid Extensibility: Project Web App (Part 2 of 3) (Level 400)&lt;/a&gt;    &lt;br /&gt; Thursday, April 22, 2010    &lt;br /&gt; 1:00 P.M.-2:00 P.M. Pacific Time    &lt;br /&gt; This is the second webcast in a three-part series on extending grid pages in Microsoft Office Project Web App. In this webcast, we focus on the use of events and delegates to interact with the timesheet grid in a way that allows for the addition of custom features and functionality to that page.    &lt;br /&gt;&amp;#160; &lt;br /&gt;&lt;a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032448999&amp;amp;Culture=en-US" target="_blank"&gt;MSDN Webcast: Project 2010 JS Grid Extensibility: Project Web App (Part 3 of 3) (Level 400)&lt;/a&gt;    &lt;br /&gt; Tuesday, April 27, 2010    &lt;br /&gt; 1:00 P.M.-2:00 P.M. Pacific Time    &lt;br /&gt; This is the third webcast in a three-part series on extending grid pages in Microsoft Office Project Web App. In this webcast, we walk you through more grid customizations, including adding custom commands to the column header dropdown and custom row header states.    &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10393529" width="1" height="1"&gt;</description></item><item><title>Project Server 2013 reporting database (RDB) schema reference</title><link>http://blogs.msdn.com/b/project_programmability/archive/2013/01/28/project-server-2013-reporting-database-rdb-schema-reference.aspx</link><pubDate>Mon, 28 Jan 2013 22:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10388967</guid><dc:creator>Jim  Corbin</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/project_programmability/rsscomments.aspx?WeblogPostID=10388967</wfw:commentRss><comments>http://blogs.msdn.com/b/project_programmability/archive/2013/01/28/project-server-2013-reporting-database-rdb-schema-reference.aspx#comments</comments><description>&lt;p&gt;The attached &lt;strong&gt;Project2013Reporting.exe&lt;/strong&gt; file&amp;nbsp;contains a draft release of the schema reference for the reporting tables and views in Project Server 2013. To install the files, run Project2013Reporting.exe.&amp;nbsp;The next release of the Project 2013 SDK download will also include the reporting schema reference; that will be announced here when the Project 2013 SDK update is published.&lt;/p&gt;
&lt;p&gt;The Project Server 2013 RDB and OLAP cubes are accessible only with an on-premises installation of Project Server. For Project Online, you can use REST queries of the &lt;strong&gt;ProjectData&lt;/strong&gt; OData service. The &lt;strong&gt;ProjectData&lt;/strong&gt; service is also available with on-premises installations. For more information, see &lt;a href="http://msdn.microsoft.com/en-us/library/jj163015.aspx" target="_blank"&gt;ProjectData - Project 2013 OData service reference&lt;/a&gt; in the Project 2013 SDK.&lt;/p&gt;
&lt;p&gt;The attached file includes the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;ProjectServer2013_ReportingDB.chm&lt;/strong&gt; is the HTML Help build of the RDB reference. It includes only the tables, views, stored procedures (SProcs), and user-defined functions (UDFs) that are in the &lt;strong&gt;dbo&lt;/strong&gt; user namespace of the Project Server database.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left: 60px;"&gt;&lt;strong&gt;Note:&lt;/strong&gt; The draft, published, and archive database objects are not documented. Project Server 2013 combines objects from the four Project Server 2010 databases into one database. The default name of the database is &lt;strong&gt;ProjectService&lt;/strong&gt;; different Project Web App instances can have different database names.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;OLAPCubeSchemas2013.xlsx&lt;/strong&gt; includes a worksheet for each of the 14 OLAP cubes that are available to build with Project Server 2013. Each worksheet lists the dimensions, measures, and properties that are available in the cube.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Project Server 2013 RDB includes three new tables, 27 new views, and a total of 33 tables and views that include new fields. You can easily find the new items by searching, for example, for &lt;em&gt;&amp;ldquo;New field&amp;rdquo;&lt;/em&gt; (with quotes). The following screenshot shows the new &lt;strong&gt;ProjectVisibilityMode&lt;/strong&gt; field in the dbo.MSP_EpmProject_UserView view:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/1067.imgSearchNewField_5F00_84_5F00_7A4D6FE6.gif"&gt;&lt;img style="display: inline; background-image: none;" title="imgSearchNewField_84" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/5353.imgSearchNewField_5F00_84_5F00_thumb_5F00_3A17566C.gif" alt="imgSearchNewField_84" width="913" height="466" border="0" /&gt;&amp;nbsp;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10388967" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-38-89-67/Project2013Reporting.exe" length="1410048" type="application/octet-stream" /><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Reporting/">Reporting</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Project+Server/">Project Server</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Project+Server+2013/">Project Server 2013</category></item><item><title>Building an app for Project Server 2013</title><link>http://blogs.msdn.com/b/project_programmability/archive/2012/12/07/building-an-app-for-project-server-2013.aspx</link><pubDate>Fri, 07 Dec 2012 22:26:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10375680</guid><dc:creator>Jim  Corbin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/project_programmability/rsscomments.aspx?WeblogPostID=10375680</wfw:commentRss><comments>http://blogs.msdn.com/b/project_programmability/archive/2012/12/07/building-an-app-for-project-server-2013.aspx#comments</comments><description>&lt;p&gt;Alex Burton, a Project MVP, has published a series of posts titled &lt;em&gt;Building your first Project Server app&lt;/em&gt; on the &lt;a href="http://epmsource.com/" target="_blank"&gt;EPMSource&lt;/a&gt; blog. The app is named Publish All; it publishes all enterprise projects for the PWA instance where the app is installed. The Publish All app is developed by using the Project Server JavaScript object model (JSOM) with "Napa" Office 365 Development Tools, and can be deployed to Project Online and to an on-premises installation of Project Server 2013.&lt;/p&gt;
&lt;p&gt;The blog series includes the following parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://epmsource.com/2012/11/20/building-your-first-project-server-app-part-zerothe-introduction/" target="_blank"&gt;Part Zero&amp;ndash;The introduction&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://epmsource.com/2012/11/23/building-your-first-project-server-app-part-1-getting-started-setting-up-a-development-environment/" target="_blank"&gt;Part 1 &amp;ndash; Getting Started &amp;ndash; Setting up a development environment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://epmsource.com/2012/11/27/building-your-first-project-server-app-part-2-getting-the-basic-app-up-and-running/" target="_blank"&gt;Part 2 &amp;ndash; Getting the basic app up and running&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://epmsource.com/2012/12/01/building-your-first-project-server-app-part-3-taking-the-app-to-the-next-level/" target="_blank"&gt;Part 3 &amp;ndash; Taking the app to the next level&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://epmsource.com/2012/12/07/building-your-first-project-server-app-part-4-submitting-to-the-app-store/" target="_blank"&gt;Part 4 &amp;ndash; Submitting to the app store&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Alex has even gone so far as to add a support page for the Publish All app, at &lt;a title="http://epmsource.com/2013-apps/" href="http://epmsource.com/2013-apps/"&gt;http://epmsource.com/2013-apps/&lt;/a&gt;. It looks to be a very useful series.&lt;/p&gt;
&lt;p&gt;For more information about the Napa tools, see &lt;a href="http://msdn.microsoft.com/en-us/library/jj220041.aspx" target="_blank"&gt;How to: Create a basic app for SharePoint by using Office 365 Development Tools&lt;/a&gt; on MSDN. For information about using Visual Studio 2012 with the JSOM for Project Server, see &lt;a href="http://msdn.microsoft.com/en-us/library/jj163037.aspx" target="_blank"&gt;Getting started with the Project Server 2013 JavaScript object model&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10375680" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Project+Server+2013/">Project Server 2013</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/apps/">apps</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Project+Online/">Project Online</category></item><item><title>Installing the Project 2013 SDK download on Windows 8</title><link>http://blogs.msdn.com/b/project_programmability/archive/2012/11/12/installing-the-project-2013-sdk-download-on-windows-8.aspx</link><pubDate>Mon, 12 Nov 2012 20:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10367864</guid><dc:creator>Jim  Corbin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/project_programmability/rsscomments.aspx?WeblogPostID=10367864</wfw:commentRss><comments>http://blogs.msdn.com/b/project_programmability/archive/2012/11/12/installing-the-project-2013-sdk-download-on-windows-8.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;&lt;span&gt;The &lt;/span&gt;&lt;a href="https://www.microsoft.com/en-us/download/details.aspx?id=30435"&gt;&lt;span&gt;Project 2013 SDK download&lt;/span&gt;&lt;/a&gt;&lt;span&gt; is updated for the RTM release of Project 2013. In addition to articles, references, and code samples that are updated from the July release of Project 2013 Preview, the SDK also includes a local copy of VBA Help for Project Standard and Project Professional.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;You can install the downloaded Project2013SDK.msi file on computers that are running Windows 8, Windows 7 (and a couple of earlier Windows releases), Windows Server 2008 R2, and Windows Server 2012. When you install the SDK on a Windows 7 machine, the SDK contents are accessible from the &lt;strong&gt;Start &lt;/strong&gt;menu. Figure 1 shows, for example, that the &lt;strong&gt;Microsoft SDKs&lt;/strong&gt; folder contains the &lt;strong&gt;Project 2013 SDK &lt;/strong&gt;folder, which contains links to three files. From the hierarchical context of the &lt;strong&gt;Start &lt;/strong&gt;menu, it is clear that the &lt;strong&gt;Documentation&lt;/strong&gt; node is contained in the &lt;strong&gt;Project 2013 SDK&lt;/strong&gt; folder.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;&lt;span&gt;Similarly, if you install the &lt;/span&gt;&lt;a href="https://www.microsoft.com/en-us/download/details.aspx?id=30722"&gt;&lt;span&gt;SharePoint 2013 SDK download&lt;/span&gt;&lt;/a&gt;&lt;span&gt; and the &lt;/span&gt;&lt;a href="https://www.microsoft.com/en-us/download/details.aspx?id=30721"&gt;&lt;span&gt;Apps for Office and SharePoint SDK download&lt;/span&gt;&lt;/a&gt;&lt;span&gt;, they each create a folder in &lt;strong&gt;Microsoft SDKs&lt;/strong&gt;, and each SDK has a &lt;strong&gt;Documentation &lt;/strong&gt;node within its folder.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;&lt;strong&gt;&lt;span&gt;Figure 1. Using the Project 2013 SDK from the Windows 7 Start menu&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/4848.PJ15SDK_5F00_Start_5F00_Win7_5F00_0F79073E.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="PJ15SDK_Start_Win7" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/5428.PJ15SDK_5F00_Start_5F00_Win7_5F00_thumb_5F00_2B1D9334.jpg" alt="PJ15SDK_Start_Win7" width="342" height="514" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="color: #0080ff; font-family: verdana,geneva; font-size: large;"&gt;The problem&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;&lt;span&gt;Windows 8 does not have a &lt;strong&gt;Start &lt;/strong&gt;menu, it has two related &lt;strong&gt;Start &lt;/strong&gt;screens. After you install the Project 2013 SDK download, and scroll the main &lt;strong&gt;Start &lt;/strong&gt;screen to the links for the installed files, you can see the same three links as in Windows 7. (To see the Welcome Guide on the &lt;strong&gt;Start &lt;/strong&gt;screen, you can search for &lt;em&gt;Welcome.rtf&lt;/em&gt;, open it in Internet Explorer, and then pin &lt;strong&gt;Welcome Guide&lt;/strong&gt; to the &lt;strong&gt;Start&lt;/strong&gt; screen.) &lt;/span&gt;&lt;a&gt;&lt;span&gt;But&lt;/span&gt;&lt;/a&gt;&lt;span&gt;, the &lt;strong&gt;Start &lt;/strong&gt;screen in Windows 8 is not arranged in hierarchical folders. In Figure 2, it is not clear what the &lt;strong&gt;Documentation &lt;/strong&gt;link is for.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;&lt;strong&gt;&lt;span&gt;Figure 2. Using the Documentation link to the Project 2013 SDK, on the Windows 8 Start screen&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/0714.Win8_5F00_StartScreen_5F00_Documentation_5F00_76110403.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="Win8_StartScreen_Documentation" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/6012.Win8_5F00_StartScreen_5F00_Documentation_5F00_thumb_5F00_6EF1C78B.jpg" alt="Win8_StartScreen_Documentation" width="645" height="485" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;The problem is worse if you also install the SharePoint 2013 SDK and the Apps for Office and SharePoint 2013 SDK. You would then have three &lt;strong&gt;Documentation &lt;/strong&gt;links and three &lt;strong&gt;Welcome Guide&lt;/strong&gt; links, each of which goes to a different SDK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;If you right-click one of the &lt;strong&gt;Start &lt;/strong&gt;screen icons, the icon shows a check mark, and the &lt;strong&gt;Start &lt;/strong&gt;screen shows options at the bottom (see Figure 2). If you choose &lt;strong&gt;All apps&lt;/strong&gt; at the bottom right of the screen, Windows 8 shows lists of installed apps within top-level groups. For example, the &lt;strong&gt;Microsoft SDKs&lt;/strong&gt; group contains links for all of the Office, Project, and SharePoint SDKs that you install; there are no subfolders to distinguish which links go to which SDK. In Figure 3, only the Project 2013 SDK is installed, and the links have the same names as in Figure 2. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;&lt;strong&gt;&lt;span&gt;Figure 3. Using the Project 2013 SDK links in the Apps view, in Windows 8&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/1307.Win8_5F00_AllApps_5F00_MicrosoftSDKs_5F00_4ED6BACE.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="Win8_AllApps_MicrosoftSDKs" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/6505.Win8_5F00_AllApps_5F00_MicrosoftSDKs_5F00_thumb_5F00_0A965382.jpg" alt="Win8_AllApps_MicrosoftSDKs" width="641" height="481" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="color: #0080c0; font-family: Calibri; font-size: large;"&gt;The workaround (for now)&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;On a machine with Windows 8, you can install one SDK at a time, and then rename the links on the &lt;strong&gt;Start &lt;/strong&gt;screen, before installing another SDK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #0080c0; font-family: verdana,geneva; font-size: small;"&gt;To install Office, Project, and SharePoint SDKs on Windows 8&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;Log on to Windows 8 as an administrator.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;Install, for example, the Project 2013 SDK.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;On the &lt;strong&gt;Start &lt;/strong&gt;screen, right-click the &lt;strong&gt;Documentation &lt;/strong&gt;icon, and then choose&lt;strong&gt; Open file location&lt;/strong&gt; at the bottom of the screen.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt;On the Windows Desktop, rename the &lt;strong&gt;Documentation &lt;/strong&gt;link as &lt;strong&gt;Project 2013 SDK Documentation&lt;/strong&gt;, and then choose &lt;strong&gt;Continue &lt;/strong&gt;in the &lt;strong&gt;File Access Denied &lt;/strong&gt;dialog box (see Figure 4). &lt;br /&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-family: Calibri; font-size: small;"&gt; &lt;br /&gt;Figure 4. Renaming the Project 2013 SDK links in the Desktop view &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/7266.Win8_5F00_Rename_5F00_Documentation_5F00_5589C451.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="Win8_Rename_Documentation" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/5123.Win8_5F00_Rename_5F00_Documentation_5F00_thumb_5F00_635C0A4C.jpg" alt="Win8_Rename_Documentation" width="666" height="429" border="0" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;Similarly, rename the &lt;strong&gt;VBA Reference&lt;/strong&gt; link as &lt;strong&gt;Project 2013 VBA Reference&lt;/strong&gt;, and rename the &lt;strong&gt;Welcome Guide&lt;/strong&gt; link as&lt;strong&gt; Project 2013 Welcome Guide&lt;/strong&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: small;"&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;With the mouse pointer in the lower-left corner of the screen, choose the &lt;strong&gt;Start&lt;/strong&gt; pop-up icon, and then scroll to the Project 2013 SDK icons (see Figure 5).&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Figure 5. Using the renamed links in the Start view &lt;br /&gt;&lt;/strong&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/3060.Win8_5F00_StartScreen_5F00_ProjectSDK_5F00_Renamed_5F00_2E4F7B1C.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="Win8_StartScreen_ProjectSDK_Renamed" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/2474.Win8_5F00_StartScreen_5F00_ProjectSDK_5F00_Renamed_5F00_thumb_5F00_2325F0D2.jpg" alt="Win8_StartScreen_ProjectSDK_Renamed" width="280" height="481" border="0" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;Install the Apps for Office and SharePoint 2013 SDK, and similarly rename the &lt;strong&gt;Start&lt;/strong&gt; screen links.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: verdana,geneva; font-size: x-small;"&gt;Install the SharePoint 2013 SDK, and similarly rename the &lt;strong&gt;Start&lt;/strong&gt; screen links. Figure 6 shows the Microsoft SDKs group with the renamed links in the All apps view. &lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&lt;strong&gt;&lt;span style="font-family: verdana,geneva;"&gt;Figure 6. Using the renamed links for all three SDKs in the All apps view&lt;/span&gt; &lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/1212.Win8_5F00_AllApps_5F00_3SDKs_5F00_Renamed_5F00_551D915C.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="Win8_AllApps_3SDKs_Renamed" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/8168.Win8_5F00_AllApps_5F00_3SDKs_5F00_Renamed_5F00_thumb_5F00_3502849F.jpg" alt="Win8_AllApps_3SDKs_Renamed" width="199" height="449" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: x-small;"&gt;In future releases, the Office, SharePoint, and Project SDK downloads will be reconfigured so that they install with non-conflicting link names on Windows 8.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10367864" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/SDK/">SDK</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Project+2013/">Project 2013</category></item><item><title>Creating Project Workflows using Visual Studio 2012</title><link>http://blogs.msdn.com/b/project_programmability/archive/2012/11/07/creating-project-workflows-using-visual-studio-2012.aspx</link><pubDate>Wed, 07 Nov 2012 19:30:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10366655</guid><dc:creator>Kia Amiri</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/project_programmability/rsscomments.aspx?WeblogPostID=10366655</wfw:commentRss><comments>http://blogs.msdn.com/b/project_programmability/archive/2012/11/07/creating-project-workflows-using-visual-studio-2012.aspx#comments</comments><description>&lt;p&gt;In Project Server 2010, Project developers were able to create Project Workflows using Visual Studio 2010. In Project Server 2013, &lt;a href="http://blogs.office.com/b/project/archive/2012/09/18/demand-management-sharepoint-designer-project-server.aspx"&gt;we enabled creating the workflows with SharePoint Designer&lt;/a&gt;, which makes it much easier and faster to create Project Workflows. In &lt;a href="http://blogs.office.com/b/project/archive/2012/09/18/demand-management-sharepoint-designer-project-server.aspx"&gt;that blog post&lt;/a&gt;, we showed how we have simplified the workflow creation for Project using SharePoint Designer 2013.&lt;/p&gt;
&lt;p&gt;&lt;a&gt;We are, however, still supporting creating Project Workflows with Visual Studio for the more complex set of workflows, and in fact, have also made it easier to create Project Workflows with Visual Studio 2012. Below, we are going to use a sample two-stage workflow to show how you can create workflows with Visual Studio 2012:&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;1. Creating the Workflow solution: File Menu&amp;gt;New&amp;gt;Project&amp;gt;Office/SharePoint&amp;gt;SharePoint solutions &amp;gt; SharePoint 2013 Project. Give this project a name, and hit OK: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/5165.clip_5F00_image002_5F00_70F114FA.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image002" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/7384.clip_5F00_image002_5F00_thumb_5F00_50D6083D.jpg" alt="clip_image002" width="497" height="306" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the customization wizard, enter the address of the PWA web you&amp;rsquo;d like this workflow to be published to. Then, pick the sandboxed solution option to limit this workflow to this particular PWA web: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/5241.clip_5F00_image004_5F00_7399D0AB.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image004" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/1440.clip_5F00_image004_5F00_thumb_5F00_537EC3EE.jpg" alt="clip_image004" width="411" height="326" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. At this point, the project you&amp;rsquo;ll see the empty canvas. In the Project Menu, click on the Add New Item, and from the Office/SharePoint tab, select Workflow, enter a name, and hit Add: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/4667.clip_5F00_image006_5F00_1E7234BE.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image006" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/1524.clip_5F00_image006_5F00_thumb_5F00_4135FD2C.jpg" alt="clip_image006" width="465" height="284" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then, in the customization wizard, pick Site workflow: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/2185.clip_5F00_image008_5F00_211AF06F.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image008" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/2117.clip_5F00_image008_5F00_thumb_5F00_19FBB3F7.jpg" alt="clip_image008" width="397" height="384" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then, pick the history list and the workflow tasks list from that site. We recommend that you use the default lists since a number of PWA UI entry points, use these default lists. Then, hit Finish: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/4744.clip_5F00_image009_5F00_40C9CA37.png"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image009" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/3187.clip_5F00_image009_5F00_thumb_5F00_39AA8DBF.png" alt="clip_image009" width="399" height="387" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;3. Now, we need to set up the environment to use the Project Server activities. In the toolbox, right click and click on &amp;ldquo;add tab&amp;rdquo;, and call the new tab &amp;ldquo;project server&amp;rdquo;: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/1033.clip_5F00_image011_5F00_756A2672.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image011" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/6646.clip_5F00_image011_5F00_thumb_5F00_2761C6FD.jpg" alt="clip_image011" width="316" height="470" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then, right click on the &amp;ldquo;project server&amp;rdquo; tab and click on &amp;ldquo;choose items&amp;rdquo; from the menu, and you&amp;rsquo;ll see this dialog: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/8473.clip_5F00_image013_5F00_430652F3.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image013" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/0458.clip_5F00_image013_5F00_thumb_5F00_3BE7167B.jpg" alt="clip_image013" width="429" height="314" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the dialog click on Browse, and navigate to where the workflow dlls are located. They are usually located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\WorkflowActivities &lt;br /&gt;You&amp;rsquo;ll see two activities dll there. Open the project server one (Microsoft.Office.Project.Server.WorkflowActivities.dll), and hit OK. You are now taken back to the &amp;ldquo;toolbox items&amp;rdquo; dialog, and highlights the selected corresponding activities. Hit OK to continue. &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/2185.clip_5F00_image015_5F00_299E4FB9.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image015" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/8484.clip_5F00_image015_5F00_thumb_5F00_227F1341.jpg" alt="clip_image015" width="470" height="338" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;4. You might see a &amp;ldquo;sequence&amp;rdquo; in the canvas. Delete that, and from the toolbox, pick Flowchart and add it by dragging it into the main area. This flowchart will be the main container of all the stages of the workflow: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/8054.image_5F00_3051593C.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/0535.image_5F00_thumb_5F00_10364C7F.png" alt="image" width="659" height="277" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the toolbox, click on Control flow, and add the sequence inside that flowchart. Throughout this sample workflow, we will use sequence to represent workflow stages in Visual Studio. This is similar to how SharePoint Designer handles each stage, i.e. each stage is equivalent to a separate sequence in Visual Studio: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/5153.clip_5F00_image019_5F00_4BF5E532.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image019" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/6724.clip_5F00_image019_5F00_thumb_5F00_44D6A8BA.jpg" alt="clip_image019" width="586" height="300" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Rename the sequence to &amp;ldquo;Create_Stage&amp;rdquo; by clicking on the &amp;ldquo;Sequence&amp;rdquo; and start typing to change the name. Drag the line from start to &amp;ldquo;Create_Stage&amp;rdquo; to connect them together: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/4670.clip_5F00_image021_5F00_52A8EEB5.jpg"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image021" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/2526.clip_5F00_image021_5F00_thumb_5F00_328DE1F8.jpg" alt="clip_image021" width="406" height="155" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;5. Double click on the &amp;ldquo;Create_Stage&amp;rdquo; to drill into this sequence&lt;/p&gt;
&lt;p&gt;a. Under project server in toolbox, add the &amp;ldquo;EnterProjectStage&amp;rdquo; and &amp;ldquo;ExitProjectStageGate&amp;rdquo; activities to the sequence. These two activities are required in any of the PWA stages in Visual Studio.&lt;/p&gt;
&lt;p&gt;b. In the properties of &amp;ldquo;EnterProjectStage&amp;rdquo;, change the StageID to the Stage ID of the particular stage you&amp;rsquo;d want this sequence to represent. You can find the stage ID in the URL of that stage, and is available if you navigate to that stage in PWA Settings &amp;gt; Workflow Stages, and then click on the particular stage. Since stageID is a string, the ID should be provided in quotation marks.&lt;/p&gt;
&lt;p&gt;c. Put another sequence between &amp;ldquo;EnterProjectStage&amp;rdquo; and &amp;ldquo;ExitProjectStageGate&amp;rdquo;. Essentially, everything in this sequence is what is represented in the text-based designer in SharePoint Designer stage definition.&lt;/p&gt;
&lt;p&gt;d. From project server item in the toolbox, drop the &amp;ldquo;waitForProjEvent&amp;rdquo; activity in that sequence: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/1031.clip_5F00_image022_5F00_1272D53B.png"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image022" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/8877.clip_5F00_image022_5F00_thumb_5F00_07494AF1.png" alt="clip_image022" width="231" height="357" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;e. Change the EventName property to &amp;ldquo;OnProjectSubmit&amp;rdquo;. The other supported Event Names are &amp;ldquo;OnProjectCommit&amp;rdquo; and &amp;ldquo;OnProjectCheckIn&amp;rdquo;&lt;s&gt; &lt;/s&gt;&lt;/p&gt;
&lt;p&gt;6. In the breadcrumb, click on Flowchart to go one level up. Add another sequence after Create_Stage and call it Finished_Stage, and connect the wire from Create_Stage to the Finished_Stage: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/7382.clip_5F00_image023_5F00_672E3E33.png"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image023" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/5238.clip_5F00_image023_5F00_thumb_5F00_47133176.png" alt="clip_image023" width="511" height="382" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;7. Similar to the Create_Stage, add the EnterProectStage and ExitProjectStageGate activities to the sequence as well as the WaitForProjectEvent activity in the middle, and set the properties accordingly: &lt;br /&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/8461.clip_5F00_image024_5F00_26F824B9.png"&gt;&lt;img style="display: inline; background-image: none;" title="clip_image024" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/2117.clip_5F00_image024_5F00_thumb_5F00_06DD17FC.png" alt="clip_image024" width="236" height="368" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;8. This completes building the workflow in Visual Studio. However, in order to make sure that the workflow can be properly published to the PWA, we need to make a few more changes in the xaml files of the project: From solution explorer, pick &amp;ldquo;Elements.xaml&amp;rdquo; under the workflow node&lt;/p&gt;
&lt;p&gt;a. Replace the WSEventSourceGUID with the following so that the workflow is correctly identifies as a project workflow: &lt;br /&gt;&amp;lt;Property Name="WSEventSourceGUID" Value="5122D555-E672-4E5D-A7C4-8084E694A257" /&amp;gt;&lt;/p&gt;
&lt;p&gt;b. Inject the following properties under the &amp;ldquo;Url = WorkflowStartAssociation&amp;rdquo;: &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name="Microsoft.ProjectServer.ActivationProperties.ProjectId" Value="" /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name="Microsoft.ProjectServer.ActivationProperties.CurrentStageId" Value="" /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name="Microsoft.ProjectServer.ActivationProperties.RequestedStageId" Value="" /&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;Property Name="WSEventContextKeys" Value="Microsoft.ProjectServer.ActivationProperties.CurrentStageId;#Instance&amp;amp;#xA;Microsoft.ProjectServer.ActivationProperties.ProjectId;#Instance&amp;amp;#xA;Microsoft.ProjectServer.ActivationProperties.RequestedStageId;#Instance&amp;amp;#xA;" /&amp;gt;&lt;/p&gt;
&lt;p&gt;9. Now that everything is set, and the workflow is ready for publishing, click on the &amp;ldquo;Build Solution&amp;rdquo; under the Build menu, and then click on the &amp;ldquo;Deploy Solution&amp;rdquo; under the Build menu. The wsp file is now deployed to the site. You can also find a copy of the wsp file in the file system, under [project name]&amp;gt;bin&amp;gt;debug&lt;/p&gt;
&lt;p&gt;Now, the workflow will show up in PWA. If you navigate to PWA Settings &amp;gt; Enterprise Project Types, and create a new Enterprise Project Type, you will see this workflow as one of the options in the workflow dropdown list.&lt;/p&gt;
&lt;p&gt;For more information, see &lt;a title="Getting started developing Project Server 2013 workflows" href="http://msdn.microsoft.com/en-us/library/ee767694(office.15).aspx"&gt;Getting started developing Project Server 2013 workflows&lt;/a&gt; in the Project 2013 SDK.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10366655" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Workflow/">Workflow</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Project+Server+2013/">Project Server 2013</category></item><item><title>Connecting a Project Task Pane App to PWA</title><link>http://blogs.msdn.com/b/project_programmability/archive/2012/11/02/connecting-a-project-task-pane-app-to-pwa.aspx</link><pubDate>Fri, 02 Nov 2012 22:11:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10365404</guid><dc:creator>Eli Sheldon</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/project_programmability/rsscomments.aspx?WeblogPostID=10365404</wfw:commentRss><comments>http://blogs.msdn.com/b/project_programmability/archive/2012/11/02/connecting-a-project-task-pane-app-to-pwa.aspx#comments</comments><description>&lt;h1&gt;Introduction&lt;/h1&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/office/apps/jj220082%28v=office.15%29"&gt;Apps for Office&lt;/a&gt; present a great new opportunity to bring data from a variety of sources into Office applications. The new Project specifically offers a very powerful way to surface both SharePoint and Project Web App data in a task pane app in Project Professional. To connect with SharePoint or PWA from the client, we use &lt;a href="http://msdn.microsoft.com/en-us/library/jj687470(v=office.15).aspx"&gt;on-the-fly OAuth flow as presented in the SharePoint 2013 SDK&lt;/a&gt;. The App for Project described in this article connects with the same PWA site collection that Project Professional is currently connected to, and displays data about the currently selected task that is not otherwise available from within Project Professional. This will work with all versions of Project Professional (C2R, MSI, On Demand) and with all PWA environments (Project Online, Project Server).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/5353.image_5F00_5B4B654B.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/1033.image_5F00_thumb_5F00_3006CE44.png" alt="image" width="785" height="225" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Setup&lt;/h1&gt;
&lt;p&gt;Prerequisites for this project are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Visual Studio 2012&lt;/li&gt;
&lt;li&gt;IIS or IIS Express configured to allow applications to run on your server (at localhost)&lt;/li&gt;
&lt;li&gt;Office 2013 and SharePoint 2013 tools for Visual Studio, available &lt;a href="http://go.microsoft.com/fwlink/?LinkID=261869"&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Project Professional 2013&lt;/li&gt;
&lt;li&gt;Project Online tenant or Project Server&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The first step is to launch Visual Studio 2012. Create a new App for Office 2013 project as shown below. Let&amp;rsquo;s call it &amp;ldquo;TaskLastModifiedApp&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/6232.image_5F00_28E791CC.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/7713.image_5F00_thumb_5F00_36B9D7C7.png" alt="image" width="786" height="541" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the next dialog, make this a Task Pane App for Project.&lt;/p&gt;
&lt;p&gt;We need to add references, as this app will use a number of APIs across Office and SharePoint. These DLLs may be in a different location on your system. Most of these references are automatically added if you use the App for SharePoint template, so if you can&amp;rsquo;t find these on your system, create a quick App for SharePoint solution and note the reference paths to help you out. You should add:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll&lt;/li&gt;
&lt;li&gt;C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Microsoft.IdentityModel.Extensions\v4.0_2.0.0.0__69c3241e6f0468ca\Microsoft.IdentityModel.Extensions.dll&lt;/li&gt;
&lt;li&gt;C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.WindowsTokenService.dll&lt;/li&gt;
&lt;li&gt;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.ProjectServer.Client.dll&lt;/li&gt;
&lt;li&gt;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll&lt;/li&gt;
&lt;li&gt;C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll&lt;/li&gt;
&lt;li&gt;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.IdentityModel.dll&lt;/li&gt;
&lt;li&gt;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.IdentityModel.Selectors.dll&lt;/li&gt;
&lt;li&gt;C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ServiceModel.dll&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additionally, you will need to add a copy of TokenHelper.cs, which is generated when creating an autohosted or provider-hosted App for SharePoint project.&lt;/p&gt;
&lt;h1&gt;Task Pane App Manifest&lt;/h1&gt;
&lt;p&gt;The actual task pane app is just an XML manifest. Open up TaskLastModifiedApp.xml from the TaskLastModifiedApp project in your Solution Explorer. Replace its contents with the following:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: 'Courier New', courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: #f4f4f4;"&gt;
&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt; 1:&lt;/span&gt; &amp;lt;?xml version=&lt;span style="color: #006080;"&gt;"1.0"&lt;/span&gt; encoding=&lt;span style="color: #006080;"&gt;"UTF-8"&lt;/span&gt;?&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt; 2:&lt;/span&gt; &amp;lt;OfficeApp xmlns=&lt;span style="color: #006080;"&gt;"http://schemas.microsoft.com/office/appforoffice/1.0"&lt;/span&gt; xmlns:xsi=&lt;span style="color: #006080;"&gt;"http://www.w3.org/2001/XMLSchema-instance"&lt;/span&gt; xsi:type=&lt;span style="color: #006080;"&gt;"TaskPaneApp"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt; 3:&lt;/span&gt;   &amp;lt;Id&amp;gt;[leave &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt; line alone]&amp;lt;/Id&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt; 4:&lt;/span&gt;   &amp;lt;Version&amp;gt;1.0&amp;lt;/Version&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt; 5:&lt;/span&gt;   &amp;lt;ProviderName&amp;gt;Microsoft&amp;lt;/ProviderName&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt; 6:&lt;/span&gt;   &amp;lt;DefaultLocale&amp;gt;en-US&amp;lt;/DefaultLocale&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt; 7:&lt;/span&gt;   &amp;lt;DisplayName DefaultValue=&lt;span style="color: #006080;"&gt;"TaskLastModifiedApp"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt; 8:&lt;/span&gt;   &amp;lt;Description DefaultValue=&lt;span style="color: #006080;"&gt;"This app will show you when the selected task was last modified"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt; 9:&lt;/span&gt;   &amp;lt;AppDomains&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt; 10:&lt;/span&gt;     &amp;lt;AppDomain&amp;gt;https:&lt;span style="color: #008000;"&gt;//localhost:44301/&amp;lt;/AppDomain&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt; 11:&lt;/span&gt;   &amp;lt;/AppDomains&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt; 12:&lt;/span&gt;   &amp;lt;Capabilities&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt; 13:&lt;/span&gt;     &amp;lt;Capability Name=&lt;span style="color: #006080;"&gt;"Project"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt; 14:&lt;/span&gt;   &amp;lt;/Capabilities&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt; 15:&lt;/span&gt;   &amp;lt;DefaultSettings&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt; 16:&lt;/span&gt;     &amp;lt;SourceLocation DefaultValue=&lt;span style="color: #006080;"&gt;"https://localhost:44301/pages/URLConstructor.aspx"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt; 17:&lt;/span&gt;   &amp;lt;/DefaultSettings&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt; 18:&lt;/span&gt;   &amp;lt;Permissions&amp;gt;ReadWriteDocument&amp;lt;/Permissions&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt; 19:&lt;/span&gt; &amp;lt;/OfficeApp&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Replace the port after localhost (in both instances) with whatever port you have configured IIS to use for SSL. Make sure to toggle the &amp;ldquo;SSL Enabled&amp;rdquo; property on the TaskLastModifiedAppWeb project to true. Let whatever ID was originally set in the manifest remain.&lt;/p&gt;
&lt;h1&gt;Architecture&lt;/h1&gt;
&lt;p&gt;Next, delete the TaskLastModifiedApp.html page &amp;ndash; we will need .aspx pages in this project. The basic architecture of the task pane app is as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When the task pane app is launched, it loads &amp;ldquo;URLConstructor.aspx&amp;rdquo;, which pulls the PWA URL from the client and constructs a call to OAuthAuthorize with the proper tokens to request permissions for the app to access PWA data. This page loads &amp;ldquo;URLConstructor.js&amp;rdquo; to interact with the client.&lt;/li&gt;
&lt;li&gt;OAuthAuthorize is launched in a new window, since we cannot predict the customer&amp;rsquo;s Project domain. After the user trusts the app, that new window is redirected to &amp;ldquo;PostOAuth.aspx&amp;rdquo;, which surfaces the auth code back to URLConstructor.aspx.&lt;/li&gt;
&lt;li&gt;Once URLConstructor.aspx has the auth code, the task pane app is redirected with this as a token to &amp;ldquo;Default.aspx&amp;rdquo;, which has the functional code for the app. This page uses Project CSOM code in its code-behind page to read data from PWA, as well as &amp;ldquo;TaskLastModifiedApp.js&amp;rdquo; to interact with the client.&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;Constructing the OAuthAuthorize URL&lt;/h1&gt;
&lt;p&gt;The complete code for URLConstructor.aspx is as follows:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: 'Courier New', courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: #f4f4f4;"&gt;
&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt; 1:&lt;/span&gt; &amp;lt;%@ Page Language=&lt;span style="color: #006080;"&gt;"C#"&lt;/span&gt; AutoEventWireup=&lt;span style="color: #006080;"&gt;"true"&lt;/span&gt; CodeBehind=&lt;span style="color: #006080;"&gt;"URLConstructor.aspx.cs"&lt;/span&gt; Inherits=&lt;span style="color: #006080;"&gt;"TaskLastModifiedAppWeb.Pages.URLConstructor"&lt;/span&gt; %&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt; 2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt; 3:&lt;/span&gt; &amp;lt;!DOCTYPE html&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt; 4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt; 5:&lt;/span&gt; &amp;lt;html xmlns=&lt;span style="color: #006080;"&gt;"http://www.w3.org/1999/xhtml"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt; 6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt; 7:&lt;/span&gt; &amp;lt;head runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt; 8:&lt;/span&gt;     &amp;lt;title&amp;gt;TaskLastModifiedApp&amp;lt;/title&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt; 9:&lt;/span&gt;     &amp;lt;meta http-equiv=&lt;span style="color: #006080;"&gt;"X-UA-Compatible"&lt;/span&gt; content=&lt;span style="color: #006080;"&gt;"IE=9"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt; 10:&lt;/span&gt;     &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt; src=&lt;span style="color: #006080;"&gt;"..\Scripts\Office\1.0\MicrosoftAjax.js"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt; 11:&lt;/span&gt;     &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt; src=&lt;span style="color: #006080;"&gt;"..\Scripts\Office\1.0\Office.js"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt; 12:&lt;/span&gt;     &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt; src=&lt;span style="color: #006080;"&gt;"..\Scripts\URLConstructor.js"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt; 13:&lt;/span&gt;     &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt; 14:&lt;/span&gt;         function getClientId() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt; 15:&lt;/span&gt;             var clientId = &lt;span style="color: #006080;"&gt;'&amp;lt;%=ConfigurationManager.AppSettings["ClientId"].ToString() %&amp;gt;'&lt;/span&gt;; &lt;span style="color: #008000;"&gt;//read the clientID from web.config&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt; 16:&lt;/span&gt;             getPwaUrl(clientId); &lt;span style="color: #008000;"&gt;//return to client code&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt; 17:&lt;/span&gt;         }&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt; 18:&lt;/span&gt; &amp;lt;/head&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt; 19:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt; 20:&lt;/span&gt; &amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt; 21:&lt;/span&gt;     Redirecting...&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt; 22:&lt;/span&gt; &amp;lt;/body&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt; 23:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt; 24:&lt;/span&gt; &amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This page needs to be an .aspx page in order to read from web.config, but does not need anything in its code-behind. The clientId read from web.config is needed for the authorization flow. getPwaUrl() is a function within URLConstructor.js.&lt;/p&gt;
&lt;p&gt;The complete code for URLConstructor.js is as follows:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: 'Courier New', courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: #f4f4f4;"&gt;
&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt; 1:&lt;/span&gt; var _projDoc;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt; 2:&lt;/span&gt; var pwaUrl;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt; 3:&lt;/span&gt; var oAuthUrl;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt; 4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt; 5:&lt;/span&gt; Office.initialize = function (reason) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt; 6:&lt;/span&gt;     _projDoc = Office.context.document;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt; 7:&lt;/span&gt;     getClientId(); &lt;span style="color: #008000;"&gt;//on document load, reads the ClientId from web.config first since it is server-side&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt; 8:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt; 9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt; 10:&lt;/span&gt; function getPwaUrl(clientId) { &lt;span style="color: #008000;"&gt;//uses Office App API to read PWA URL&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt; 11:&lt;/span&gt;     _projDoc.getProjectFieldAsync(Office.ProjectProjectFields.ProjectServerUrl,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt; 12:&lt;/span&gt;         function (asyncResult) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt; 13:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (asyncResult.status == Office.AsyncResultStatus.Succeeded) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt; 14:&lt;/span&gt;                 pwaUrl = asyncResult.&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;.fieldValue;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt; 15:&lt;/span&gt;                 generateUrl(clientId); &lt;span style="color: #008000;"&gt;//creates the OAuthAuthorize URL with necessary parameters&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt; 16:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt; 17:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;else&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt; 18:&lt;/span&gt;                 logMethodError(&lt;span style="color: #006080;"&gt;"getProjectFieldAsync"&lt;/span&gt;, asyncResult.error.name, asyncResult.error.message);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt; 19:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt; 20:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt; 21:&lt;/span&gt;     )&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt; 22:&lt;/span&gt; };&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt; 23:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt; 24:&lt;/span&gt; function generateUrl(clientId) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt; 25:&lt;/span&gt;     oAuthUrl = pwaUrl + &lt;span style="color: #006080;"&gt;"/_layouts/15/OAuthAuthorize.aspx?IsDlg=1&amp;amp;client_id="&lt;/span&gt; + clientId + &lt;span style="color: #006080;"&gt;"&amp;amp;scope=Projects.Read&amp;amp;response_type=code&amp;amp;redirect_uri=https://localhost:44301/pages/PostOAuth.aspx"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt; 26:&lt;/span&gt;     authWindow = window.open(oAuthUrl);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt; 27:&lt;/span&gt;     codeListener(); &lt;span style="color: #008000;"&gt;//start listening for the auth code&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt; 28:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt; 29:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt; 30:&lt;/span&gt; function codeListener() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt; 31:&lt;/span&gt;     setTimeout(function () { readCode(); }, 1000); &lt;span style="color: #008000;"&gt;//check for the auth code every one second&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum32" style="color: #606060;"&gt; 32:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum33" style="color: #606060;"&gt; 33:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum34" style="color: #606060;"&gt; 34:&lt;/span&gt; function readCode() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum35" style="color: #606060;"&gt; 35:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;try&lt;/span&gt; { &lt;span style="color: #008000;"&gt;//if we can actually reach the authCode field on PostOAuth.aspx&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum36" style="color: #606060;"&gt; 36:&lt;/span&gt;         authCode = authWindow.document.getElementById(&lt;span style="color: #006080;"&gt;"authCode"&lt;/span&gt;).&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;;  &lt;span style="color: #008000;"&gt;//pull the authCode value&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum37" style="color: #606060;"&gt; 37:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (authCode != &lt;span style="color: #006080;"&gt;"NA"&lt;/span&gt;) { &lt;span style="color: #008000;"&gt;//if it is not the default "NA"&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum38" style="color: #606060;"&gt; 38:&lt;/span&gt;             authWindow.close(); &lt;span style="color: #008000;"&gt;//close the new window&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum39" style="color: #606060;"&gt; 39:&lt;/span&gt;             document.location.href = &lt;span style="color: #006080;"&gt;"/Pages/Default.aspx?code="&lt;/span&gt; + authCode; &lt;span style="color: #008000;"&gt;//redirect task pane to the app code with the authCode token&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum40" style="color: #606060;"&gt; 40:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum41" style="color: #606060;"&gt; 41:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum42" style="color: #606060;"&gt; 42:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;catch&lt;/span&gt; (e) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum43" style="color: #606060;"&gt; 43:&lt;/span&gt;         codeListener(); &lt;span style="color: #008000;"&gt;//if we couldn't reach PostOAuth.aspx, wait another second and try again&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum44" style="color: #606060;"&gt; 44:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum45" style="color: #606060;"&gt; 45:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;When the task pane app loads, it first reads web.config from the aspx page, since this is server-side code. Once it has the clientId, we read the PWA URL. We then create the full OAuthAuthorize URL with the parameters specified above. scope=Projects.Read requests read permission to projects on the current PWA site. Make sure to match the SSL port here as well, as before.&lt;/p&gt;
&lt;p&gt;On running the app, a new window will open up outside of Project that prompts the user to login to PWA (if they have not checked &amp;ldquo;Keep me signed in&amp;rdquo; previously). They will then be presented with a &amp;ldquo;Do you trust&amp;hellip;&amp;rdquo; page, the same as if they were installing an App for SharePoint. This is the OAuthAuthorize.aspx page. Once trusted, that new window navigates to PostOAuth.aspx, presented below:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: 'Courier New', courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: #f4f4f4;"&gt;
&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt; 1:&lt;/span&gt; &amp;lt;%@ Page Language=&lt;span style="color: #006080;"&gt;"C#"&lt;/span&gt; AutoEventWireup=&lt;span style="color: #006080;"&gt;"true"&lt;/span&gt; CodeBehind=&lt;span style="color: #006080;"&gt;"PostOAuth.aspx.cs"&lt;/span&gt; Inherits=&lt;span style="color: #006080;"&gt;"TaskLastModifiedAppWeb.Pages.PostOAuth"&lt;/span&gt; %&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt; 2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt; 3:&lt;/span&gt; &amp;lt;!DOCTYPE html&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt; 4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt; 5:&lt;/span&gt; &amp;lt;html xmlns=&lt;span style="color: #006080;"&gt;"http://www.w3.org/1999/xhtml"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt; 6:&lt;/span&gt; &amp;lt;head runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt; 7:&lt;/span&gt;     &amp;lt;title&amp;gt;&amp;lt;/title&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt; 8:&lt;/span&gt; &amp;lt;/head&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt; 9:&lt;/span&gt; &amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt; 10:&lt;/span&gt;     &amp;lt;form id=&lt;span style="color: #006080;"&gt;"form1"&lt;/span&gt; runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt; 11:&lt;/span&gt;     &amp;lt;div&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt; 12:&lt;/span&gt;     &amp;lt;asp:HiddenField ID=&lt;span style="color: #006080;"&gt;"authCode"&lt;/span&gt; runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"NA"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt; 13:&lt;/span&gt;         Closing...&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt; 14:&lt;/span&gt;     &amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt; 15:&lt;/span&gt;     &amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt; 16:&lt;/span&gt; &amp;lt;/body&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt; 17:&lt;/span&gt; &amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;And PostOAuth.aspx.cs:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: 'Courier New', courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: #f4f4f4;"&gt;
&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Web;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Web.UI;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt; 7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;namespace&lt;/span&gt; TaskLastModifiedAppWeb.Pages&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt; 9:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt; 10:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; PostOAuth : System.Web.UI.Page&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt; 11:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt; 12:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt; 13:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt; 14:&lt;/span&gt;             var code = Request.QueryString[&lt;span style="color: #006080;"&gt;"code"&lt;/span&gt;];&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt; 15:&lt;/span&gt;             authCode.Value = code;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt; 16:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt; 17:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt; 18:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This page saves the auth code token in a hidden field. The task pane app, still on URLConstructor.aspx, waits for this value and then closes the new window. The app then continues on to default.aspx with the proper code token needed to finish the OAuth flow.&lt;/p&gt;
&lt;h1&gt;Reading the Last Modified Date of the Selected Task&lt;/h1&gt;
&lt;p&gt;The remainder of this article is an example of what you might do in your task pane app now that you have read access to PWA data. This example will show you the Last Modified date and time of the task you have selected. On launch, it shows you data for the selected task, and as you change tasks, the data is updated using an event handler.&lt;/p&gt;
&lt;p&gt;The complete code for Default.aspx is as follows:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: 'Courier New', courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: #f4f4f4;"&gt;
&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt; 1:&lt;/span&gt; &amp;lt;%@ Page Language=&lt;span style="color: #006080;"&gt;"C#"&lt;/span&gt; AutoEventWireup=&lt;span style="color: #006080;"&gt;"true"&lt;/span&gt; CodeBehind=&lt;span style="color: #006080;"&gt;"Default.aspx.cs"&lt;/span&gt; Inherits=&lt;span style="color: #006080;"&gt;"TaskLastModifiedAppWeb.Pages.Default"&lt;/span&gt; %&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt; 2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt; 3:&lt;/span&gt; &amp;lt;!DOCTYPE html&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt; 4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt; 5:&lt;/span&gt; &amp;lt;html xmlns=&lt;span style="color: #006080;"&gt;"http://www.w3.org/1999/xhtml"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt; 6:&lt;/span&gt; &amp;lt;head runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt; 7:&lt;/span&gt;     &amp;lt;title&amp;gt;TaskLastModifiedApp&amp;lt;/title&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt; 8:&lt;/span&gt;     &amp;lt;meta http-equiv=&lt;span style="color: #006080;"&gt;"X-UA-Compatible"&lt;/span&gt; content=&lt;span style="color: #006080;"&gt;"IE=9"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt; 9:&lt;/span&gt;     &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt; src=&lt;span style="color: #006080;"&gt;"..\Scripts\Office\1.0\MicrosoftAjax.js"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt; 10:&lt;/span&gt;     &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt; src=&lt;span style="color: #006080;"&gt;"..\Scripts\Office\1.0\Office.js"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt; 11:&lt;/span&gt;     &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt; src=&lt;span style="color: #006080;"&gt;"..\Scripts\TaskLastModifiedApp.js"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt; 12:&lt;/span&gt;     &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt; 13:&lt;/span&gt; &amp;lt;/head&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt; 14:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt; 15:&lt;/span&gt; &amp;lt;body&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt; 16:&lt;/span&gt;     &amp;lt;form id=&lt;span style="color: #006080;"&gt;"form1"&lt;/span&gt; runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt; 17:&lt;/span&gt;         &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt; 18:&lt;/span&gt;         &amp;lt;asp:HiddenField ID=&lt;span style="color: #006080;"&gt;"projGuidHF"&lt;/span&gt; runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt; 19:&lt;/span&gt;         &amp;lt;asp:HiddenField ID=&lt;span style="color: #006080;"&gt;"taskGuidHF"&lt;/span&gt; runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt; 20:&lt;/span&gt;         &amp;lt;asp:HiddenField ID=&lt;span style="color: #006080;"&gt;"pwaUrlHF"&lt;/span&gt; runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt; 21:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt; 22:&lt;/span&gt;         &amp;lt;asp:Label ID=&lt;span style="color: #006080;"&gt;"TaskLastModLabel"&lt;/span&gt; runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt; Text=&lt;span style="color: #006080;"&gt;"Loading..."&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt; 23:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt; 24:&lt;/span&gt;         &amp;lt;div style=&lt;span style="color: #006080;"&gt;"display: none;"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt; 25:&lt;/span&gt;             &amp;lt;asp:Button ID=&lt;span style="color: #006080;"&gt;"hiddenTaskChangedButton"&lt;/span&gt; runat=&lt;span style="color: #006080;"&gt;"server"&lt;/span&gt; OnClick=&lt;span style="color: #006080;"&gt;"OnTaskChanged"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt; 26:&lt;/span&gt;         &amp;lt;/div&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt; 27:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt; 28:&lt;/span&gt;     &amp;lt;/form&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt; 29:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt; 30:&lt;/span&gt; &amp;lt;/body&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt; 31:&lt;/span&gt; &amp;lt;/html&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This page contains three hidden fields used to pass data back and forth between the client-side code and the server-side code. It also leverages a label to surface the results to the user, and a hidden button that the client-side code uses to call a server-side function, as you will see below.&lt;/p&gt;
&lt;p&gt;The complete code for TaskLastModifiedApp.js is as follows:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: 'Courier New', courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: #f4f4f4;"&gt;
&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt; 1:&lt;/span&gt; var _projDoc;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt; 2:&lt;/span&gt; var taskGuid;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt; 3:&lt;/span&gt; var projGuid;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt; 4:&lt;/span&gt; var pwaUrl;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt; 5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt; 6:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// This runs after every postback&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt; 7:&lt;/span&gt; Office.initialize = function (reason) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt; 8:&lt;/span&gt;     _projDoc = Office.context.document;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt; 9:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (document.getElementById(&lt;span style="color: #006080;"&gt;"pwaUrlHF"&lt;/span&gt;).&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt; == &lt;span style="color: #006080;"&gt;"NA"&lt;/span&gt;) { &lt;span style="color: #008000;"&gt;//if this is the first run&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt; 10:&lt;/span&gt;         firstRun();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt; 11:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt; 12:&lt;/span&gt;     manageTaskEventHandler(&lt;span style="color: #006080;"&gt;'addHandlerAsync'&lt;/span&gt;); &lt;span style="color: #008000;"&gt;//need to re-register event handler after each postback&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt; 13:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt; 14:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt; 15:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// Only need these on the first page load, not on postbacks&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt; 16:&lt;/span&gt; function firstRun() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt; 17:&lt;/span&gt;     getProjGuid();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt; 18:&lt;/span&gt;     _projDoc.getProjectFieldAsync(Office.ProjectProjectFields.ProjectServerUrl,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt; 19:&lt;/span&gt;         function (asyncResult) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt; 20:&lt;/span&gt;             pwaUrl = asyncResult.&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;.fieldValue;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt; 21:&lt;/span&gt;             document.getElementById(&lt;span style="color: #006080;"&gt;"pwaUrlHF"&lt;/span&gt;).&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt; = pwaUrl;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt; 22:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt; 23:&lt;/span&gt;     )&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt; 24:&lt;/span&gt;     getTaskGuid();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt; 25:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt; 26:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt; 27:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// Get the GUID of the selected task, comes from SDK&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt; 28:&lt;/span&gt; function getTaskGuid() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt; 29:&lt;/span&gt;     var TaskLastModLabel = document.getElementById(&lt;span style="color: #006080;"&gt;"TaskLastModLabel"&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt; 30:&lt;/span&gt;     TaskLastModLabel.innerHTML = &lt;span style="color: #006080;"&gt;"Loading..."&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt; 31:&lt;/span&gt;     _projDoc.getSelectedTaskAsync(function (asyncResult) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum32" style="color: #606060;"&gt; 32:&lt;/span&gt;         taskGuid = asyncResult.&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum33" style="color: #606060;"&gt; 33:&lt;/span&gt;         document.getElementById(&lt;span style="color: #006080;"&gt;"taskGuidHF"&lt;/span&gt;).&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt; = taskGuid; &lt;span style="color: #008000;"&gt;//saves the task GUID to a hidden field to pass to the code-behind&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum34" style="color: #606060;"&gt; 34:&lt;/span&gt;         document.getElementById(&lt;span style="color: #006080;"&gt;"hiddenTaskChangedButton"&lt;/span&gt;).click(); &lt;span style="color: #008000;"&gt;//runs the CSOM calls in the aspx.cs file&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum35" style="color: #606060;"&gt; 35:&lt;/span&gt;     });&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum36" style="color: #606060;"&gt; 36:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum37" style="color: #606060;"&gt; 37:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum38" style="color: #606060;"&gt; 38:&lt;/span&gt;  &lt;span style="color: #008000;"&gt;// Get the GUID of the current project.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum39" style="color: #606060;"&gt; 39:&lt;/span&gt; function getProjGuid() {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum40" style="color: #606060;"&gt; 40:&lt;/span&gt;     _projDoc.getProjectFieldAsync(Office.ProjectProjectFields.GUID,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum41" style="color: #606060;"&gt; 41:&lt;/span&gt;         function (asyncResult) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum42" style="color: #606060;"&gt; 42:&lt;/span&gt;             projGuid = asyncResult.&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;.fieldValue;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum43" style="color: #606060;"&gt; 43:&lt;/span&gt;             document.getElementById(&lt;span style="color: #006080;"&gt;"projGuidHF"&lt;/span&gt;).&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt; = projGuid; &lt;span style="color: #008000;"&gt;//saves the project GUID to a hidden field to pass to the code-behind&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum44" style="color: #606060;"&gt; 44:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum45" style="color: #606060;"&gt; 45:&lt;/span&gt;     )&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum46" style="color: #606060;"&gt; 46:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum47" style="color: #606060;"&gt; 47:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum48" style="color: #606060;"&gt; 48:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// Task selection changed event handler.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum49" style="color: #606060;"&gt; 49:&lt;/span&gt; function onTaskSelectionChanged(eventArgs) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum50" style="color: #606060;"&gt; 50:&lt;/span&gt;     getTaskGuid();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum51" style="color: #606060;"&gt; 51:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum52" style="color: #606060;"&gt; 52:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum53" style="color: #606060;"&gt; 53:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// Add or remove a task selection changed event handler.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum54" style="color: #606060;"&gt; 54:&lt;/span&gt; function manageTaskEventHandler(docMethod) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum55" style="color: #606060;"&gt; 55:&lt;/span&gt;     manageEventHandlerAsync(&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum56" style="color: #606060;"&gt; 56:&lt;/span&gt;         Office.EventType.TaskSelectionChanged,      &lt;span style="color: #008000;"&gt;// The task selection changed event.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum57" style="color: #606060;"&gt; 57:&lt;/span&gt;         onTaskSelectionChanged,                     &lt;span style="color: #008000;"&gt;// The event handler.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum58" style="color: #606060;"&gt; 58:&lt;/span&gt;         docMethod                &lt;span style="color: #008000;"&gt;// The Office.Document method to add or remove an event handler.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum59" style="color: #606060;"&gt; 59:&lt;/span&gt;     );&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum60" style="color: #606060;"&gt; 60:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum61" style="color: #606060;"&gt; 61:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum62" style="color: #606060;"&gt; 62:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// Add or remove the specified event handler.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum63" style="color: #606060;"&gt; 63:&lt;/span&gt; function manageEventHandlerAsync(eventType, handler, operation, onComplete) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum64" style="color: #606060;"&gt; 64:&lt;/span&gt;     _projDoc[operation]   &lt;span style="color: #008000;"&gt;//The operation is addHandlerAsync or removeHandlerAsync.&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum65" style="color: #606060;"&gt; 65:&lt;/span&gt;     (&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum66" style="color: #606060;"&gt; 66:&lt;/span&gt;         eventType,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum67" style="color: #606060;"&gt; 67:&lt;/span&gt;         handler,&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum68" style="color: #606060;"&gt; 68:&lt;/span&gt;         function (asyncResult) {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum69" style="color: #606060;"&gt; 69:&lt;/span&gt;             &lt;span style="color: #008000;"&gt;// code here runs after event has been registered (or failed)&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum70" style="color: #606060;"&gt; 70:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum71" style="color: #606060;"&gt; 71:&lt;/span&gt;     );&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum72" style="color: #606060;"&gt; 72:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The first time this code runs, it pulls the PWA URL (just like we did in URLConstructor.js) and saves it to one of our hidden fields, registers a client-side event handler to capture when a new task is selected, and starts the process of connecting to PWA and pulling the data we need, which is mostly done in the code-behind file. After each postback, we do not need to recapture the PWA URL, as our ProjectContext is maintained as a static variable.&lt;/p&gt;
&lt;p&gt;We need to make one quick tweak to TokenHelper.cs first &amp;ndash; change GetRealmFromTargetUrl from a private method to a public method.&lt;/p&gt;
&lt;p&gt;The complete code for Default.aspx.cs is as follows:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: 'Courier New', courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: #f4f4f4;"&gt;
&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt; 1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt; 2:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt; 3:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Linq;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt; 4:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Web;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt; 5:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Web.UI;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt; 6:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Web.UI.WebControls;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt; 7:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; Microsoft.ProjectServer.Client;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt; 8:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; Microsoft.SharePoint.Client;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt; 9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt; 10:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;namespace&lt;/span&gt; TaskLastModifiedAppWeb.Pages&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt; 11:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt; 12:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; Default : System.Web.UI.Page&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt; 13:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt; 14:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; ProjectContext projContext;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt; 15:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; PublishedProject thisProj;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt; 16:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; Guid projGuid;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt; 17:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt; 18:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; Page_Load(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt; 19:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt; 20:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (!IsPostBack) &lt;span style="color: #008000;"&gt;//set values of hidden fields if this is the first page load&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt; 21:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt; 22:&lt;/span&gt;                 projGuidHF.Value = &lt;span style="color: #006080;"&gt;"NA"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt; 23:&lt;/span&gt;                 taskGuidHF.Value = &lt;span style="color: #006080;"&gt;"NA"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt; 24:&lt;/span&gt;                 pwaUrlHF.Value = &lt;span style="color: #006080;"&gt;"NA"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt; 25:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt; 26:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt; 27:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt; 28:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt; 29:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; GetContexts()&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt; 30:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt; 31:&lt;/span&gt;             var code = Request.QueryString[&lt;span style="color: #006080;"&gt;"code"&lt;/span&gt;]; &lt;span style="color: #008000;"&gt;//pulls the code token from the request&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum32" style="color: #606060;"&gt; 32:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum33" style="color: #606060;"&gt; 33:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; targetPwa = pwaUrlHF.Value; &lt;span style="color: #008000;"&gt;//pulls the PWA URL from where the Office app API stored it&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum34" style="color: #606060;"&gt; 34:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum35" style="color: #606060;"&gt; 35:&lt;/span&gt;             Uri targetPwaUri = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Uri(targetPwa);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum36" style="color: #606060;"&gt; 36:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum37" style="color: #606060;"&gt; 37:&lt;/span&gt;             var tRealm = TokenHelper.GetRealmFromTargetUrl(targetPwaUri);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum38" style="color: #606060;"&gt; 38:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum39" style="color: #606060;"&gt; 39:&lt;/span&gt;             Uri rUri = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Uri(&lt;span style="color: #006080;"&gt;"https://localhost:44301/pages/PostOAuth.aspx"&lt;/span&gt;); &lt;span style="color: #008000;"&gt;//hardcoded link to redirect_uri&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum40" style="color: #606060;"&gt; 40:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum41" style="color: #606060;"&gt; 41:&lt;/span&gt;             var clientContext = TokenHelper.GetClientContextWithAuthorizationCode(targetPwa, &lt;span style="color: #006080;"&gt;"00000003-0000-0ff1-ce00-000000000000"&lt;/span&gt;, code, tRealm, rUri);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum42" style="color: #606060;"&gt; 42:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum43" style="color: #606060;"&gt; 43:&lt;/span&gt;             projContext = GetProjectContextWithAuthorizationCode(targetPwa, &lt;span style="color: #006080;"&gt;"00000003-0000-0ff1-ce00-000000000000"&lt;/span&gt;, code, tRealm, rUri);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum44" style="color: #606060;"&gt; 44:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum45" style="color: #606060;"&gt; 45:&lt;/span&gt;             projGuid = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Guid(&lt;span style="color: #006080;"&gt;"{"&lt;/span&gt; + projGuidHF.Value + &lt;span style="color: #006080;"&gt;"}"&lt;/span&gt;); &lt;span style="color: #008000;"&gt;//loads the current project through CSOM&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum46" style="color: #606060;"&gt; 46:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum47" style="color: #606060;"&gt; 47:&lt;/span&gt;             var projects = projContext.LoadQuery(projContext.Projects.Where(proj =&amp;gt; proj.Id == projGuid));&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum48" style="color: #606060;"&gt; 48:&lt;/span&gt;             projContext.ExecuteQuery();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum49" style="color: #606060;"&gt; 49:&lt;/span&gt;             thisProj = projects.First();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum50" style="color: #606060;"&gt; 50:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum51" style="color: #606060;"&gt; 51:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum52" style="color: #606060;"&gt; 52:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OnTaskChanged(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, EventArgs e) &lt;span style="color: #008000;"&gt;//determine the selected task's last modified date&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum53" style="color: #606060;"&gt; 53:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum54" style="color: #606060;"&gt; 54:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (thisProj == &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum55" style="color: #606060;"&gt; 55:&lt;/span&gt;             {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum56" style="color: #606060;"&gt; 56:&lt;/span&gt;                 GetContexts();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum57" style="color: #606060;"&gt; 57:&lt;/span&gt;             }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum58" style="color: #606060;"&gt; 58:&lt;/span&gt;             &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum59" style="color: #606060;"&gt; 59:&lt;/span&gt;             var taskGuid = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Guid(taskGuidHF.Value);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum60" style="color: #606060;"&gt; 60:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum61" style="color: #606060;"&gt; 61:&lt;/span&gt;             var tasks = projContext.LoadQuery(thisProj.Tasks.Where(task =&amp;gt; task.Id == taskGuid)); &lt;span style="color: #008000;"&gt;//load the selected task off of the project&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum62" style="color: #606060;"&gt; 62:&lt;/span&gt;             projContext.ExecuteQuery();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum63" style="color: #606060;"&gt; 63:&lt;/span&gt;             PublishedTask thisTask = tasks.First();&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum64" style="color: #606060;"&gt; 64:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; dateMod = thisTask.Modified.ToString(&lt;span style="color: #006080;"&gt;"D"&lt;/span&gt;); &lt;span style="color: #008000;"&gt;//pull out the Modified field on the task&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum65" style="color: #606060;"&gt; 65:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; timeMod = thisTask.Modified.ToString(&lt;span style="color: #006080;"&gt;"t"&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum66" style="color: #606060;"&gt; 66:&lt;/span&gt;             TaskLastModLabel.Text = &lt;span style="color: #006080;"&gt;"The selected task was last modified on "&lt;/span&gt; + dateMod + &lt;span style="color: #006080;"&gt;" at "&lt;/span&gt; + timeMod + &lt;span style="color: #006080;"&gt;"."&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum67" style="color: #606060;"&gt; 67:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum68" style="color: #606060;"&gt; 68:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum69" style="color: #606060;"&gt; 69:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; ProjectContext GetProjectContextWithAuthorizationCode(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; targetUrl,&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; targetPrincipalName,&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; authorizationCode,&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; targetRealm,Uri redirectUri)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum70" style="color: #606060;"&gt; 70:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum71" style="color: #606060;"&gt; 71:&lt;/span&gt;             Uri targetUri = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Uri(targetUrl);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum72" style="color: #606060;"&gt; 72:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum73" style="color: #606060;"&gt; 73:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; accessToken =&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum74" style="color: #606060;"&gt; 74:&lt;/span&gt;                 TokenHelper.GetAccessToken(authorizationCode, targetPrincipalName, targetUri.Authority, targetRealm, redirectUri).AccessToken;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum75" style="color: #606060;"&gt; 75:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum76" style="color: #606060;"&gt; 76:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; GetProjectContextWithAccessToken(targetUrl, accessToken);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum77" style="color: #606060;"&gt; 77:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum78" style="color: #606060;"&gt; 78:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum79" style="color: #606060;"&gt; 79:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; ProjectContext GetProjectContextWithAccessToken(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; targetUrl, &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; accessToken)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum80" style="color: #606060;"&gt; 80:&lt;/span&gt;         {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum81" style="color: #606060;"&gt; 81:&lt;/span&gt;             Uri targetUri = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Uri(targetUrl);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum82" style="color: #606060;"&gt; 82:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum83" style="color: #606060;"&gt; 83:&lt;/span&gt;             ProjectContext projContext = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; ProjectContext(targetUrl);&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum84" style="color: #606060;"&gt; 84:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum85" style="color: #606060;"&gt; 85:&lt;/span&gt;             projContext.AuthenticationMode = ClientAuthenticationMode.Anonymous;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum86" style="color: #606060;"&gt; 86:&lt;/span&gt;             projContext.FormDigestHandlingEnabled = &lt;span style="color: #0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum87" style="color: #606060;"&gt; 87:&lt;/span&gt;             projContext.ExecutingWebRequest +=&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum88" style="color: #606060;"&gt; 88:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;delegate&lt;/span&gt;(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; oSender, WebRequestEventArgs webRequestEventArgs)&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum89" style="color: #606060;"&gt; 89:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum90" style="color: #606060;"&gt; 90:&lt;/span&gt;                     webRequestEventArgs.WebRequestExecutor.RequestHeaders[&lt;span style="color: #006080;"&gt;"Authorization"&lt;/span&gt;] =&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum91" style="color: #606060;"&gt; 91:&lt;/span&gt;                         &lt;span style="color: #006080;"&gt;"Bearer "&lt;/span&gt; + accessToken;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum92" style="color: #606060;"&gt; 92:&lt;/span&gt;                 };&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum93" style="color: #606060;"&gt; 93:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum94" style="color: #606060;"&gt; 94:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; projContext;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum95" style="color: #606060;"&gt; 95:&lt;/span&gt;         }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum96" style="color: #606060;"&gt; 96:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum97" style="color: #606060;"&gt; 97:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h3&gt;PageLoad()&lt;/h3&gt;
&lt;p&gt;The first time the page loads, we need to initialize the hidden field values. This enables us to not set them directly in Default.aspx (and thus lose their values after a postback) and lets the client-side code distinguish between a first run load and a postback.&lt;/p&gt;
&lt;h3&gt;GetContexts()&lt;/h3&gt;
&lt;p&gt;This code also only runs once, assuming the current project remains loaded. This handles the last part of the OAuth flow &amp;ndash; we use the code token from OAuthAuthorize to generate a client context and a project context using methods in TokenHelper.cs, as well as slightly modified methods GetProjectContextWithAuthorizationCode() and GetProjectContextWithAccessToken().&lt;/p&gt;
&lt;h3&gt;OnTaskChanged()&lt;/h3&gt;
&lt;p&gt;This first checks to make sure we have a project loaded from which to pull data. We then read the selected task guid from the hidden field, which was updated client-side before this method was called. We use Project CSOM to load the selected task from PWA and read its Last Modified field, which is then presented to the user in a readable format using the label on Default.aspx.&lt;/p&gt;
&lt;h1&gt;Register the App ID and App Secret&lt;/h1&gt;
&lt;p&gt;Since we are not submitting this app to the Office Store, we need to register it on our test tenant. On your tenant, navigate to https://[your PWA site]/_layouts/15/appregnew.aspx. Generate a new App Id and App Secret, set the Title to &amp;ldquo;TaskLastModifiedApp&amp;rdquo;, set the App Domain to localhost:44301 (or wherever the app code is running), and set the Redirect URI to match the redirect_uri token value in the oAuth URL created in URLConstructor.js.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/4263.image_5F00_0F7F8E92.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/2110.image_5F00_thumb_5F00_41772F1C.png" alt="image" width="357" height="289" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hit Create, and then add the App Id and App Secret to web.config in your Visual Studio solution. It should look like the following when you are done, with your values for ClientId and ClientSecret:&lt;/p&gt;
&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: 'Courier New', courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: #f4f4f4;"&gt;
&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt; 1:&lt;/span&gt; &amp;lt;?xml version=&lt;span style="color: #006080;"&gt;"1.0"&lt;/span&gt;?&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt; 2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt; 3:&lt;/span&gt; &amp;lt;configuration&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt; 4:&lt;/span&gt;     &amp;lt;system.web&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt; 5:&lt;/span&gt;       &amp;lt;compilation debug=&lt;span style="color: #006080;"&gt;"true"&lt;/span&gt; targetFramework=&lt;span style="color: #006080;"&gt;"4.0"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt; 6:&lt;/span&gt;     &amp;lt;/system.web&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt; 7:&lt;/span&gt;   &amp;lt;appSettings&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt; 8:&lt;/span&gt;     &amp;lt;add key=&lt;span style="color: #006080;"&gt;"ClientId"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"a9ce3d5a-bb14-4aad-9c27-41a05c473b4d"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt; 9:&lt;/span&gt;     &amp;lt;add key=&lt;span style="color: #006080;"&gt;"ClientSecret"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"hL0C8wt2PPaBYNYRMZzcUcu3C/Vv0fbm48djGzyIXOw="&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: #f4f4f4;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt; 10:&lt;/span&gt;   &amp;lt;/appSettings&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;
&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: 'Courier New', courier, monospace; font-size: 8pt; direction: ltr; background-color: white;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt; 11:&lt;/span&gt; &amp;lt;/configuration&amp;gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;h1&gt;Time to Test!&lt;/h1&gt;
&lt;p&gt;To run the app, just hit F5 in Visual Studio, which will launch Project Professional. Make sure to connect to a PWA profile, then load a published project (or create and publish a new one). From a task view, select the Project tab in the ribbon, hit the dropdown for Apps for Office, and click TaskLastModifiedApp.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/3681.image_5F00_215C225F.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/8080.image_5F00_thumb_5F00_014115A2.png" alt="image" width="786" height="469" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The app will launch in a task pane on the right side of the screen. It&amp;rsquo;ll prompt you to trust the app, quickly load, and then display the last modified date and time of the selected task.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/2117.image_5F00_0F135B9D.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/7416.image_5F00_thumb_5F00_6EF84EDF.png" alt="image" width="788" height="474" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Select a different task, and the data will update almost instantly.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/0535.image_5F00_39EBBFAF.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/5153.image_5F00_thumb_5F00_47BE05AA.png" alt="image" width="789" height="478" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Wrap-Up&lt;/h1&gt;
&lt;p&gt;In this blog post, you have learned how to create a task pane app in Project Professional that can display data from PWA that would not normally be visible in the client. The app uses SharePoint&amp;rsquo;s OAuthAuthorize page to request permissions from PWA and handle the authentication handshake between the app code and your online data. For more on working with OAuth, make sure to check out the &lt;a href="http://msdn.microsoft.com/en-us/library/fp142384(v=office.15).aspx"&gt;relevant node in the SharePoint 2013 SDK.&lt;/a&gt; For more information on PWA programmability, check out the &lt;a href="http://msdn.microsoft.com/en-us/library/ms512767(v=office.15).aspx"&gt;Project 2013 SDK&lt;/a&gt;. To learn more about writing task pane apps for the new Project, see &lt;a href="http://msdn.microsoft.com/en-us/library/office/apps/fp161143(v=office.15).aspx"&gt;this node in the Office 2013 SDK&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10365404" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-36-54-04/TaskLastModifiedApp.zip" length="1036825" type="application/zip" /></item><item><title>New VBA classes and members in Project Professional 2013 Preview</title><link>http://blogs.msdn.com/b/project_programmability/archive/2012/09/03/new-vba-members-in-project-professional-2013-preview.aspx</link><pubDate>Mon, 03 Sep 2012 16:39:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10345973</guid><dc:creator>Jim  Corbin</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/project_programmability/rsscomments.aspx?WeblogPostID=10345973</wfw:commentRss><comments>http://blogs.msdn.com/b/project_programmability/archive/2012/09/03/new-vba-members-in-project-professional-2013-preview.aspx#comments</comments><description>&lt;p&gt;The &lt;em&gt;What&amp;rsquo;s new for developers in the new Project desktop (besides task pane apps)&lt;/em&gt; article is available in the &lt;a href="http://blogs.msdn.com/b/officedevdocs/" target="_blank"&gt;Office Developer Blog&lt;/a&gt;. The VBA and VSTO object model includes includes classes that support new reports with charts, tables, and Office Art. Other new members in the Project object model support the new task paths feature, cache status, and working with tasks lists in SharePoint 2013.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10345973" width="1" height="1"&gt;</description></item><item><title>Project 2013 Preview SDK and related resources</title><link>http://blogs.msdn.com/b/project_programmability/archive/2012/07/27/project-2013-preview-sdk-and-related-resources.aspx</link><pubDate>Fri, 27 Jul 2012 19:48:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10334303</guid><dc:creator>Jim  Corbin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/project_programmability/rsscomments.aspx?WeblogPostID=10334303</wfw:commentRss><comments>http://blogs.msdn.com/b/project_programmability/archive/2012/07/27/project-2013-preview-sdk-and-related-resources.aspx#comments</comments><description>&lt;p&gt;The &lt;a href="https://www.microsoft.com/en-us/download/details.aspx?id=30435%20"&gt;Project 2013 Preview SDK download &lt;/a&gt;is published. The conceptual, how-to, and reference documentation in the download closely matches the &lt;a href="http://msdn.microsoft.com/en-us/library/ms512767(office.15).aspx"&gt;Project 2013 developer documentation&lt;/a&gt; online content published on MSDN. In addition, the download also contains:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Ten complete code solutions, including two task pane apps for Project, six client-side object model (CSOM) solutions, and two solutions for querying the &lt;b&gt;ProjectData &lt;/b&gt;service for reporting. &lt;/li&gt;    &lt;li&gt;DLLs and a license for redistribution of the three Project Server CSOM assemblies, JavaScript files for the CSOM, and the Microsoft.Office.Project.Server.Library assembly.      &lt;br /&gt;      &lt;br /&gt;&lt;b&gt;Note: &lt;/b&gt;Project CSOM solutions also require the redistributable DLLs for the SharePoint 2013 CSOM, which are at &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=30355"&gt;SharePoint Server 2013 Client Components SDK&lt;/a&gt;.       &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Intellisense files for the PSI and CSOM, source code for creating a PSI proxy assembly, and instructions on how to update the PSI proxy files. &lt;/li&gt;    &lt;li&gt;XML schemas for the Project client, AppProvisioning, and the Statusing PSI. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The top-level online landing page for the Project SDK is &lt;i&gt;Project for developers &lt;/i&gt;(&lt;a href="http://msdn.microsoft.com/project"&gt;http://msdn.microsoft.com/project&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;For additional Project-related SDK content, see &lt;i&gt;Office for developers&lt;/i&gt; (&lt;a href="http://msdn.microsoft.com/office"&gt;http://msdn.microsoft.com/office&lt;/a&gt;), &lt;i&gt;SharePoint for developers&lt;/i&gt; (&lt;a href="http://msdn.microsoft.com/sharepoint"&gt;http://msdn.microsoft.com/sharepoint&lt;/a&gt;), and &lt;i&gt;Build apps for Office and SharePoint&lt;/i&gt; (&lt;a href="http://msdn.microsoft.com/office/apps/"&gt;http://msdn.microsoft.com/office/apps/&lt;/a&gt;). The two articles on &lt;a href="http://msdn.microsoft.com/en-us/library/office/apps/fp161143(v=office.15)"&gt;Task pane apps for Project&lt;/a&gt; are in the &lt;i&gt;Apps for Office and SharePoint SDK&lt;/i&gt;, and the &lt;a href="http://msdn.microsoft.com/en-us/library/office/apps/fp142185(v=office.15)"&gt;JavaScript API for Office&lt;/a&gt; reference includes information specific for Project, the &lt;b&gt;ProjectDocument &lt;/b&gt;object with eleven methods and three events, and four enumerations for Project. Those SDK downloads are now published:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=30721" target="_blank"&gt;Apps for Office and SharePoint Preview SDK&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=30722" target="_blank"&gt;SharePoint 2013 Preview SDK&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Want to try out Project 2013?&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Sign up for the &lt;a href="http://www.microsoft.com/project/en-us/Preview/default.aspx"&gt;Project Online Preview&lt;/a&gt; with Project Pro for Office 365 &lt;/li&gt;    &lt;li&gt;Download &lt;a href="http://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200113118"&gt;Project Professional 2013 Preview&lt;/a&gt; &amp;amp; &lt;a href="http://technet.microsoft.com/evalcenter/hh973403"&gt;Project Server 2013 Preview&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10334303" width="1" height="1"&gt;</description></item><item><title>Using the updated ChangeXML utility for Statusing</title><link>http://blogs.msdn.com/b/project_programmability/archive/2012/03/20/using-the-updated-changexml-utility-for-statusing.aspx</link><pubDate>Tue, 20 Mar 2012 22:14:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10285081</guid><dc:creator>Jim  Corbin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/project_programmability/rsscomments.aspx?WeblogPostID=10285081</wfw:commentRss><comments>http://blogs.msdn.com/b/project_programmability/archive/2012/03/20/using-the-updated-changexml-utility-for-statusing.aspx#comments</comments><description>&lt;p&gt;The Statusing methods in the Project Server Interface (PSI) in Microsoft Project Server 2010 enable one user to read, submit, and update assignment and task status for another user, without resorting to impersonation. In the Project Server 2007 SDK, the &lt;a href="http://msdn.microsoft.com/en-us/library/bb428819(office.12).aspx" target="_blank"&gt;How to: Generate ChangeXML for Statusing Updates&lt;/a&gt; article shows how to generate the &lt;em&gt;changeXml&lt;/em&gt; parameter for the &lt;strong&gt;UpdateStatus&lt;/strong&gt; method, validate the XML, and use the &lt;strong&gt;ReadStatus&lt;/strong&gt; and &lt;strong&gt;SubmitStatus&lt;/strong&gt; methods. The Project 2007 SDK download includes the complete Visual Studio 2005 solution for the ChangeXML utility. However, the ChangeXML utility could only update status for the current user.&lt;/p&gt;
&lt;p&gt;The ChangeXML utility&amp;nbsp; is now updated for Project Server 2010, in the attached ChangeXMLUtility.zip file. With it, you can generate the &lt;em&gt;changeXml&lt;/em&gt; parameter and update status for the current user or for another user. To update status for another user, the utility uses the &lt;strong&gt;ReadStatusForResource and UpdateStatusForResource&lt;/strong&gt; methods. In addition, the utility checks whether the current user has the global &lt;strong&gt;StatusBrokerPermission&lt;/strong&gt; security permission, adds the &lt;strong&gt;ResID&lt;/strong&gt; attribute to the &lt;em&gt;changeXml&lt;/em&gt; parameter, and validates the XML against the updated ChangeList.xsd schema in Project Server 2010. For more information about the ChangeList.xsd schema, see &lt;a href="http://msdn.microsoft.com/en-us/library/bb428844.aspx" target="_blank"&gt;Introduction to the ChangeList Schema and Statusing ChangeXML&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The ChangeXML utility is designed for use only on a test installation of Project Server 2010, as an example of a programming utility for statusing. It should not be used on a production installation.&lt;/p&gt;
&lt;p&gt;The updated ChangeXML utility also has several other changes. The previous version uses the ASMX interface, which was the only choice available for Project Server 2007. In the updated version, you can choose to programmatically initialize the WCF interface of the PSI by entering the Project Web App URL, or by using the WCF endpoint values in the app.config file. In the following screenshot, the login is automatic if you use the app.config value.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/8524.ChangeXML_5F00_LogOn_5F00_AppConfig_5F00_3CD4262E.gif"&gt;&lt;img style="display: inline; background-image: none;" title="ChangeXML_LogOn_AppConfig" border="0" alt="ChangeXML_LogOn_AppConfig" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/4807.ChangeXML_5F00_LogOn_5F00_AppConfig_5F00_thumb_5F00_236C22F4.gif" width="269" height="342" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: To use the app.config file, change the URL to the value for your PWA instance, for each PSI service endpoint.&lt;/p&gt;
&lt;p&gt;In the main window, after you log on Project Server, choose &lt;strong&gt;Build Change XML&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/1261.ChangeXML_5F00_Main_5F00_Empty_5F00_71084F74.gif"&gt;&lt;img style="display: inline; background-image: none;" title="ChangeXML_Main_Empty" border="0" alt="ChangeXML_Main_Empty" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/4401.ChangeXML_5F00_Main_5F00_Empty_5F00_thumb_5F00_10B7293D.gif" width="374" height="397" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can choose to update the status of available assignments for the current user, or &amp;ndash; if you have the &lt;strong&gt;StatusBrokerPermission&lt;/strong&gt; &amp;ndash; you can choose another user and update assignments for that user. In the following screenshot, the update is for another user. The &lt;strong&gt;Items available for update&lt;/strong&gt; list shows the &lt;em&gt;Project name : Task name : User name&lt;/em&gt; values for each item. You can choose to update assignment values or task values for that assignment. The Generate a Change dialog box shows different controls in the Update section, depending on what kind of update you choose. For example, if you choose to update an assignment custom field, you can choose the custom field and the lookup table value, if the custom field uses a lookup table.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/3718.ChangeXML_5F00_Generate_5F00_4User_5F00_Assign_5F00_HealthCF_5F00_424296D2.gif"&gt;&lt;img style="display: inline; background-image: none;" title="ChangeXML_Generate_4User_Assign_HealthCF" border="0" alt="ChangeXML_Generate_4User_Assign_HealthCF" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/3324.ChangeXML_5F00_Generate_5F00_4User_5F00_Assign_5F00_HealthCF_5F00_thumb_5F00_0FDEC353.gif" width="506" height="370" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;When you choose &lt;strong&gt;Update XML&lt;/strong&gt;, the tool generates the &lt;em&gt;changeXml&lt;/em&gt; parameter value, as follows:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/4478.ChangeXML_5F00_Main_5F00_4User_5F00_Assign_5F00_HealthCF_5F00_7A810DEA.gif"&gt;&lt;img style="display: inline; background-image: none;" title="ChangeXML_Main_4User_Assign_HealthCF" border="0" alt="ChangeXML_Main_4User_Assign_HealthCF" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/8524.ChangeXML_5F00_Main_5F00_4User_5F00_Assign_5F00_HealthCF_5F00_thumb_5F00_61190AB0.gif" width="526" height="332" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Following is the &lt;em&gt;changeXml&lt;/em&gt; parameter value in the case shown, for updating the &lt;strong&gt;Health&lt;/strong&gt; assignment custom field. Note that the XML value includes the &lt;strong&gt;ResID&lt;/strong&gt; attribute for the &lt;strong&gt;Assn&lt;/strong&gt; element.&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&amp;lt;Changes xmlns:xsi=&lt;span class="str"&gt;"http://www.w3.org/2001/XMLSchema-instance"&lt;/span&gt; xmlns:xsd=&lt;span class="str"&gt;"http://www.w3.org/2001/XMLSchema"&lt;/span&gt;&amp;gt;
  &amp;lt;Proj ID=&lt;span class="str"&gt;"a3e78597-2302-45fc-bb15-7f23d74efdf8"&lt;/span&gt;&amp;gt;
    &amp;lt;Assn ID=&lt;span class="str"&gt;"b001d2d9-69eb-49a0-aa9f-6bbe53f9484c"&lt;br /&gt;&lt;/span&gt;           &lt;span style="background-color: #ffff00;"&gt;ResID&lt;/span&gt;=&lt;span class="str"&gt;"aa3a6f6f-bb70-4d2e-92da-b06580ae6376"&lt;/span&gt;&amp;gt;
      &amp;lt;LookupTableCustomFieldChange IsMultiValued=&lt;span class="str"&gt;"false"&lt;br /&gt;&lt;/span&gt;             CustomFieldType=&lt;span class="str"&gt;"Text"&lt;/span&gt; &lt;br /&gt;            CustomFieldGuid=&lt;span class="str"&gt;"00004f6d-90a2-439a-8cc2-1c1ef6d2da4f"&lt;br /&gt;&lt;/span&gt;             CustomFieldName=&lt;span class="str"&gt;"Health"&lt;/span&gt;&amp;gt;
        &amp;lt;LookupTableValue&lt;br /&gt;               Guid=&lt;span class="str"&gt;"0000c45d-8a43-4eb0-9b74-e535b391988a"&lt;/span&gt;&amp;gt;Late&amp;lt;/LookupTableValue&amp;gt;
      &amp;lt;/LookupTableCustomFieldChange&amp;gt;
    &amp;lt;/Assn&amp;gt;
  &amp;lt;/Proj&amp;gt;
&amp;lt;/Changes&amp;gt;&lt;/pre&gt;
&lt;p&gt;You can clear the &lt;strong&gt;Run Update&lt;/strong&gt; check box to just validate the &lt;em&gt;changeXml&lt;/em&gt; parameter. For example, manually change one of the elements, attributes, or values in the XML, and see if it still validates. Or, you can check &lt;strong&gt;Run Update&lt;/strong&gt; to validate and run the change.&lt;/p&gt;
&lt;p&gt;When the change is completed, try opening the project in Project Professional. If you are the project manager, you are prompted to review the status change in PWA. If you accept the change in PWA, to see the change, open the project in Project Professional. For example, if you changed the &lt;strong&gt;Health&lt;/strong&gt; assignment custom field, go the the &lt;strong&gt;Task Usage&lt;/strong&gt; view, and then add the &lt;strong&gt;Health&lt;/strong&gt; field to the view.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/3324.WinProj_5F00_OpenProject_5F00_AssnHealthCF_5F00_Changed_5F00_6E7F1DB6.gif"&gt;&lt;img style="display: inline; background-image: none;" title="WinProj_OpenProject_AssnHealthCF_Changed" border="0" alt="WinProj_OpenProject_AssnHealthCF_Changed" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/5140.WinProj_5F00_OpenProject_5F00_AssnHealthCF_5F00_Changed_5F00_thumb_5F00_40259809.gif" width="641" height="206" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After you save and publish the project, you can also see the change in the Reporting database. For example, run the following query in SQL Server Management Studio for the RDB:&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;SELECT&lt;/span&gt; &lt;span class="kwrd"&gt;TOP&lt;/span&gt; 1000 [AssignmentUID]
      , [ResourceUID]
      , [Health_T]
    &lt;span class="kwrd"&gt;FROM&lt;/span&gt; [ProjectServer_Reporting].[dbo].[MSP_EpmAssignment_UserView]&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: Arial;" face="Arial"&gt;Find the correct assignment and resource GUIDs in the Results pane:&lt;/span&gt;&lt;span style="font-family: Arial;" face="Arial"&gt; &lt;/span&gt;&lt;/p&gt;
&lt;pre class="csharpcode"&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/2251.SQLSrv_5F00_ReportingDB_5F00_EpmAssignment_5F00_4D8BAB0F.gif"&gt;&lt;span style="font-family: Arial;" face="Arial"&gt;&lt;img style="display: inline; background-image: none;" title="SQLSrv_ReportingDB_EpmAssignment" border="0" alt="SQLSrv_ReportingDB_EpmAssignment" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-72-34-metablogapi/2728.SQLSrv_5F00_ReportingDB_5F00_EpmAssignment_5F00_thumb_5F00_1F322562.gif" width="652" height="239" /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: Arial;" face="Arial"&gt;The ChangeXML utility is useful for creating and testing values of the &lt;em&gt;changeXml&lt;/em&gt; parameter for the &lt;strong&gt;UpdateStatus&lt;/strong&gt; method, &lt;br /&gt;where &lt;/span&gt;&lt;span style="font-family: Arial;" face="Arial"&gt;you can create and test changes for the current user and for other Project Server 2010 users.&amp;nbsp;It also contains code examples&lt;br /&gt;that show how to check for a security permission of a resource&amp;nbsp;and use statusing methods.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span style="font-family: Arial;" face="Arial"&gt;Updating the ChangeXML utility&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;" face="Arial"&gt;Here are the main steps that were used to update the application from Project Server 2007 to 2010. The user interface had only &lt;br /&gt;minor tweaks, because that was not an issue for a test tool. &lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-family: Arial;" face="Arial"&gt;&lt;span style="font-family: Arial;" face="Arial"&gt;&lt;/span&gt;&lt;/span&gt;Open in Visual Studio 2010 to update the solution; change the target to&lt;strong&gt; .NET Framework 3.5&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add a reference to the updated&amp;nbsp;ProjectServerServices.dll, which contains a proxy WCF interface of the PSI services.&lt;/li&gt;
&lt;li&gt;Remove ASMX initialization; initialize PSI services for WCF (programmatic and/or with app.config). This step is not&lt;br /&gt;essential, but the WCF interface is recommended for moving forward.&lt;/li&gt;
&lt;li&gt;Modify the&amp;nbsp;login dialog box; use the WCFHelpers.dll assembly from ProjTool for login routines. The ProjTool code for &lt;br /&gt;Project Server 2010 is in the SDK download.&lt;br /&gt;&lt;strong&gt;Note&lt;/strong&gt;: The logon routines for Forms authentication are not updated in this sample.&lt;/li&gt;
&lt;li&gt;Get and display the&amp;nbsp;&lt;strong&gt;StatusBrokerPermission&lt;/strong&gt; value for the current user. Enable the &lt;strong&gt;Update for user&lt;/strong&gt; option if the current&lt;br /&gt;user has the correct permission.&lt;/li&gt;
&lt;li&gt;Get the list of active resources, by using &lt;strong&gt;ReadUserList&lt;/strong&gt;; add the&amp;nbsp;&lt;strong&gt;ResourceItem&lt;/strong&gt; class for combobox display and values.&lt;/li&gt;
&lt;li&gt;Refresh the&amp;nbsp;list of items to update, by using &lt;strong&gt;ReadStatusForResource&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Add &lt;strong&gt;ResID&lt;/strong&gt; to classes for generating and displaying the &lt;em&gt;changeXml&lt;/em&gt; parameter (&lt;strong&gt;ChangesProj&lt;/strong&gt;, &lt;strong&gt;ChangesProjAssn&lt;/strong&gt;, &lt;br /&gt;&lt;strong&gt;ChangesProjTask&lt;/strong&gt;, and &lt;strong&gt;Items&lt;/strong&gt;).&lt;/li&gt;
&lt;li&gt;Remove the empty &lt;strong&gt;ResID&lt;/strong&gt; attribute in the&amp;nbsp;&lt;em&gt;changeXml&lt;/em&gt; value for the current user.&lt;/li&gt;
&lt;li&gt;Run statusing updates for a selected user, by using &lt;strong&gt;SubmitStatusForResource&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Test&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In actuality, testing occurs after each step is completed.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Arial;" face="Arial"&gt;&lt;/span&gt;&lt;span style="font-family: Arial;" face="Arial"&gt;&amp;mdash;Jim Corbin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10285081" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-28-50-81/ChangeXMLUtility.zip" length="2219173" type="application/octet-stream" /><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/PSI/">PSI</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Impersonation/">Impersonation</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Custom+Fields/">Custom Fields</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Statusing/">Statusing</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Lookup+Table/">Lookup Table</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/RDB/">RDB</category><category domain="http://blogs.msdn.com/b/project_programmability/archive/tags/Project+Server+2010/">Project Server 2010</category></item></channel></rss>