#ProjectOnline #PPM #PowerBI Report Pack v2 #BI #Reporting #PowerQuery #DAX #Office365

October 31, 2017 at 12:39 pm | Posted in Add-on, Administration, Customisation, Functionality, Information, Reporting | 2 Comments
Tags: , , , ,

Back in January this year I published my first Power BI report pack for Project Online, the post can be found here: https://pwmather.wordpress.com/2017/01/03/projectonline-ppm-powerbi-report-pack-bi-reporting-powerquery-dax-office365/ I have now published the second version of my report pack for Project Online. This version can be download from the link below:


This report pack consists of 8 reports for Project Online, these reports can be seen below:

Portfolio Report page:


Issues Report page:


Risks Report page:


Project Report page:


Resource Demand Report page:


Resource Report page:


Timesheet Summary Report page:


Timesheet Detail Report page:


These reports only use default intrinsic fields so it should work for all Project Online deployments.

Once downloaded, the report pack data sources will need to be updated to point to your target Project Online PWA instance. To do this you will need the Power BI desktop tool which is a free download here: https://powerbi.microsoft.com/en-us/desktop

Open the downloaded PWMatherProjectOnlinePowerBIReportPackv2.pbit template file in Power BI Desktop and follow the steps below to point the data sources to your Project Online PWA instance:


  • In the parameter window that opens, enter the full Project Online PWA URL
  • Click Load
  • The data will now start to load and you will be prompted to connect
  • On the OData feed window, click Organizational account and click Sign in and enter credentials as required
  • Click Connect
  • On the Privacy levels window set the privacy as required
  • Click Save
  • The data will load – this may take a few minutes depending on the dataset size in Project Online
  • Access the Project Report page and select a project from the project filter
  • Save the report

This file can either be emailed around to colleagues with details on how to update the credentials to their own or what would be better is to publish the report to your Power BI workspace can create an organisational content pack that others can add to their Power BI workspace. If the Power BI organisational content pack is the chosen option, you might want to create a Dashboard first. See a previous blog post on this: https://pwmather.wordpress.com/2017/02/10/projectonline-ppm-powerbi-report-pack-publish-bi-reporting-powerquery-dax-office365/

Enjoy, I hope you like it Smile


#Agile now available in #MSProject #Kanban #Scrum #Sprints #Tasks

October 25, 2017 at 7:57 am | Posted in Administration, Configuration, Customisation, Functionality, Information | Leave a comment
Tags: , , , ,

Agile is now available in Microsoft Project! This is available on the following build version or later: 8625.2055 Click-to-Run. This build version is available on the Insider – formerly Insider Fast or Monthly Channel (Targeted) – formerly Insider Slow. This post is an intro to the new features. On the New menu you will see three new projects as highlighted below:


The three new project types are:

  • Scrum Project
  • Kanban Project
  • Waterfall Project

Firstly, “Waterfall Project” is the traditional type of project that is the same as using “Blank Project”. When creating either of these you will notice some new views in Project:


These views are available regardless of the project type selected. I can insert the new Board Status and Sprint fields in to the default Gantt Chart view:


Switching views, I can then see these test tasks on the associated board views:



Both of these provide the ability to add new tasks as well as drag and drop capabilities to move tasks to different columns / statuses. On the board view you can add / update the columns / buckets, once updated here the Board Status column in the table views will have the updated values. Regardless of the view, you can use the Format tab option on the Task Boards Tools ribbon to change the columns:


More on these in when we look at the new project types.

Creating a Scrum Project or a Kanban Project gives you some other functionality. Starting with a Scrum Project (purely because it is first in the list) we can see the new project below:


The Scrum Project defaults to open with the Sprint Planning Board as the active view. On the ribbon you will also notice there is an Agile Tools Scrum tab as well as the previously seen Task Board Tools Format tab.


The Planning button enables you to switch between the two Sprint Planning views:


The Sprint button enables you to switch between the two Current Sprint views:


The All button enables you to switch to the Agile Tasks view which is a filtered tabular view that only shows tasks that are tagged as Agile = Yes.

Adjust allows you to manage the sprints. This creates three automatically for you:


By default the sprints are generated using the project finish date but you can change to manage this via a custom date if needed:


The Agile button enables you to change your project to a different Agile methodology:


Switching between Scrum / Kanban / None just changes the options you have on the ribbon. Changing to None will remove all the Agile options ribbon but you can use the Project tab to change your project back to an Agile methodology:


Tasks can be moved to different sprints or status using the board view with drag and drop or just the familiar drop down menus on the table views.

Switching to Kanban, the options change to enable you to switch backlog views:


When creating a new Kanban project, the default view is the Backlog Board.

The All button enables you to switch to the Agile Tasks view which is a filtered tabular view that only shows tasks that are tagged as Agile = Yes. Then you have the same Agile button too.

There are also new default Agile reports:


Here is the Agile – Task Status report as an example:


This new feature is a client side feature only, this capability is not available in PWA. All of the new fields in Project such as Agile, Sprint and Board Status are in Project only.

If you are looking to use an Agile methodology to manage your projects in Microsoft Project, take a look at this new feature as it allows you to manage a single project using a combination of methodologies if you wish.

#ProjectOnline #PowerBI content pack 2 available #BI #Office365 #PPM update

October 19, 2017 at 11:56 am | Posted in Add-on, Administration, Customisation, Functionality, Information, Reporting | 1 Comment
Tags: , , , ,

Following on from my previous blog post regarding the updated Project Online Power BI content pack from Microsoft –  see below if you missed it:


That was shortly removed from the Power BI service and hasn’t been updated there yet but the template file has since been made available to download from GitHub:


You can now have the default reports provided here and extend to your own requirements for example a quick change would be to change the currency symbol used if you are not using US dollars:


Another change you might want to do, is make this report pack support non-English PWA site collections. This can be done by editing all of the queries in the Query Editor, use the Advanced Editor and update the code: OData.Feed(#”PWA Site URL” & “/_api/ProjectData”), to OData.Feed(#”PWA Site URL” & “/_api/ProjectData/[en-US]“), This will ensure all of the properties exist and the reports work.

Make the changes as required then publish to your own organisation.

#Microsoft #Ignite Day 2 summary #Azure #Office365 #MSIgnite #Microsoft365

October 5, 2017 at 6:39 pm | Posted in Functionality, Information | Leave a comment
Tags: , , ,

******************** This is a guest blog post by Lee Mather ********************

Day Two

After recharging the batteries, we had another early start for day and had as many sessions packed in as possible. I will try to provide a summary of key takeaways for each session. Please let me know if you would like any further detail as I’m happy to discuss.

Session 1: Overview: Modern Windows 10 and Office ProPlus management with Enterprise Mobility + Security

This session focused on moving to a modern management for Windows and went into more detail than the session I attended on day 1. The main highlights were:

· Simplify deployment and device management with Intune and Windows Autopilot. Microsoft’s vision is for laptops and PCs to be as easy to setup as mobile phones. Microsoft 365 powered devices will benefit from the following

o Intelligent Security

o Easy deployment

o Always up to date

o Proactive insights with Windows Analytics


· A couple of slides which highlight the difference between traditional IT and modern IT



· There are a few paths to transition to modern management which has been expanded by the introduction of co-management. Co-management should be released by the end of the 2017 calendar year


Session 2: Simplify hybrid cloud protection with Microsoft Azure Security Centre

The second session of the day focused on hybrid cloud protection with Microsoft Azure Security Centre. As I mentioned this in the summary of day one, I will only highlight the features.

· Hybrid Cloud Support – This allows a unified security centre for Azure workloads as well as workloads running on-premises and in other clouds. Additional information can be found here https://azure.microsoft.com/en-us/blog/azure-security-center-extends-advanced-threat-protection-to-hybrid-cloud-workloads/

· Just In Time Access – This allows administrators to lock down ports such as RDP and to allow access when required. Additional information can be found here https://docs.microsoft.com/en-us/azure/security-center/security-center-just-in-time

· Adaptive Application Controls – This allows you to define a set of applications which can run on your VMs which helps in the fight against malware. Additional information can be found here https://docs.microsoft.com/en-us/azure/security-center/security-center-adaptive-application

· Azure Security Centre will soon include Windows Defender ATP detections. Additional information can be found here https://azure.microsoft.com/en-us/blog/azure-security-center-extends-advanced-threat-protection-to-hybrid-cloud-workloads/

· An interactive threat intelligence map has been added to the Azure Security Centre for visualisations. Additional information can be found here https://docs.microsoft.com/en-us/azure/security-center/security-center-threat-intel

· An investigation dashboard is currently in preview which will correlate all relevant data with any involved entities. You will be able to navigate between entities by clicking through the graph and providing information. Additional information is available here https://docs.microsoft.com/en-us/azure/security-center/security-center-investigation

Session 3: What’s new with Microsoft Exchange Online Public Folders

This was a 30-minute session to highlight some of the new features in Exchange Online Public folders. The main takeaway for me was the migration of public folders to Office 365 Groups. This migration approach is supported for Exchange 2010, 2013, 2016 and Exchange Online. Additional information can be found here https://blogs.technet.microsoft.com/exchange/2017/09/25/migrate-your-public-folders-to-office-365-groups/

Session 4: Office 365 Security and Compliance Overview

The session focused on the following key areas of Office 365 security:

· Threat Protection

· Information Protection

· Security Management

· Compliance Management


The main takeaways and areas of interest for this session were:

· ATP has expanded to SharePoint, OneDrive for Business and Microsoft Teams



· Safe Links will now show the original URL when a user hovers over the link

· Safe Links will now apply to internal and external email

· Safe Attachments now have a preview feature enabled to allow a user to view a document online whilst it’s being scanned. Scanning time has also been greatly reduced over the last year

· SharePoint malware will be reported in the Threat Management portal

· New updates being rolled out to Office 365 Threat Intelligence

o Threat Tracker

o Threat Explorer

o Remediation capabilities

o Attack Simulator – Admins will have the ability to simulate different threat scenarios to gain an understanding of how users behave in the event of a real attack



· Single interface for creating protection labels is on the way


· New reporting capabilities being rolled out to the Office 365 Security and Compliance Centre

· New Compliance Manager should be in Public preview later this year. Additional information can be found here https://techcommunity.microsoft.com/t5/Security-Privacy-and-Compliance/Manage-Your-Compliance-from-One-Place-Announcing-Compliance/ba-p/106493


Additional information can be found here: https://techcommunity.microsoft.com/t5/Security-Privacy-and-Compliance/Bringing-deeper-integration-and-new-capabilities-to-Office-365/ba-p/109409

Session 5: Learn about the Microsoft global network and best practices for optimizing Office 365 connectivity

This was a great session that looked at the Microsoft network and as the title suggests, provided best practise tips. The main takeaways for the sessions were as follows:

· Avoid proxy servers when connecting to Office 365

· Review Office 365 IPs regularly and update firewalls if required

· Ensure your traffic is routing to the Microsoft network in as few hops as possible


· Network performance requirements for Skype for Business and how to test your network using the Skype for Business tool – https://www.microsoft.com/en-us/download/details.aspx?id=53885



· Skype for Business is the most sensitive to network performance and requires additional ports for best user experience


· Some interesting facts regarding the Microsoft network


Session 6: Yammer’s roadmap for enhanced integration, security and compliance

This was a breakout session that only last 45 minutes. The main takeaways were:

· Local data residency preview Q4 2017

o Existing customer H2 2018

· GDPR compliance by Q1 2018

· Yammer will soon be added to eDiscovery in the Office 365 Security and Compliance Centre

· DLP policy tips will be rolling out to Yammer in 2018

· SharePoint Group integration


That concluded another busy day at Ignite!

#Microsoft #Ignite Day 1 summary #Azure #Office365 #MSIgnite #Microsoft365

October 5, 2017 at 6:18 pm | Posted in Functionality, Information | Leave a comment
Tags: , , ,

******************** This is a guest blog post by Lee Mather ********************

So, after an eventful week in Orlando at Microsoft Ignite I thought I would share with you a summary of my first day! With over 26,000 attendees it was always going to be a busy event with lots going on, we would need a team here to take in all of the information being presented to us. I am hoping to have a chance to share the other days ASAP.

Day One

During the first day I attended several sessions and would like to share the following takeaways.


The mission statement from Microsoft is to “Empower every person and every organisation to achieve more


The keynote focused on digital transformation which is aligned to the four key areas below:

· Modern Workplace

· Business Applications

· Application & Infrastructure

· Data & AI


Following on from the keynote session, I had a day packed of sessions mainly focusing on creating a modern workplace.

Session 1: Create a modern workplace with Microsoft 365

The session focused on the following key areas:

· Flexibility to work on any device, anywhere

· Improvements to Office application including PowerPoint Designer using AI.

· Teamwork

o Microsoft Teams will be the hub for teamwork including chat, calls and meetings.

o Microsoft Teams will replace the Skype for Business client over the next year

Other worthwhile mentions from the session included Cortana Calendars. Cortana Calendars is a new feature that is currently in “Exclusive” preview but essentially this service will help intelligently schedule meetings on your behalf, simply by adding Cortana in the CC field. The service will support Office 365, Outlook.com or Google calendar. Additional information can be found here https://calendar.help/

“With the speed of artificial intelligence and the personal touch of a human assistant, Calendar.help takes care of business.”

The session also focused on the modern device management and deployment. Windows Autopilot will allow new device deployment in a few simple steps, straight from the vendor to your desk without involving IT. Working with Windows Autopilot and a device management solution such as Intune, the device will be deployed, Azure AD joined or Offline domain join to Active Directory, configured with all policies defined by IT and app deployment. More on this over the coming days.

Device Co-Management was also announced as a new feature, this is the “Hybrid” device management that will support a transition from System Centre Configuration Manager (SCCM) to Intune. Co-Management will allow a device to be managed by both SCCM and Intune allowing a gradual migration to modern management whilst supporting legacy devices and applications.


Finally, a couple of new offerings from Microsoft, Microsoft 365 Education and Microsoft 365 F1. Additional details can be found here https://products.office.com/en-gb/business/office-365-f1 and https://products.office.com/en-gb/academic/compare-office-365-education-plans

Session 2: Use MDM migration tools to accelerate move from GPO to MDM

This session focused on accelerating a move to MDM and moving away from GPO to MDM policies. GPO has been around for years with many legacy policies in the workplace that may or may not be required today. Microsoft are continually releasing new device configuration policies to Intune. To support the migration away from GPO to MDM, the following PowerShell script can be executed that will output a report. https://github.com/WindowsDeviceManagement/MMAT

The tool is being regularly updated to align with new features available in Intune.


Session 3: Cloud infrastructure: Enabling new possibilities together

The Cloud Infrastructure session focused on using Azure for all workloads, big and small.


The session explained how you can setup a SAP HANA platform in minutes using Azure instead of weeks using on-premises hardware. Microsoft are continually providing more options for scaling in Azure, currently offering up to 20TB RAM for large SAP HANA deployments.


It was also recommended to use the DevTest labs to reduce costs for non-production workloads. For more information on DevTest lab please take a look here https://azure.microsoft.com/en-us/services/devtest-lab/

The Azure Security Centre is now Hybrid too, allowing for non-Azure machines to be onboarded to take full advantage of the security monitoring and recommendations built into Azure.


This is a great additional to Azure Security Centre for a single unified view of your servers, either on-premises or running in Azure.

Currently Azure have 42 regions with 100’s of data centres, 4500+ peering locations and 130+ edge sites making the Azure network one of the largest in the world.


Microsoft, in conjunction with Facebook, also completed the first transatlantic cable which is approx. 4000 miles long and can support 160TB/sec of data.


Other worthy mentions would include:

· Additional Express Route partners


· Azure Distributed Denial of Service (DDos) Protection has just been released to preview. Additional information on the DDos service from Microsoft can be found here https://azure.microsoft.com/en-us/blog/azure-ddos-protection-service-preview/


· Azure Data Box has been released in preview and would be used to support customer with large data imports to Azure. The device supports 100 TB and a customer can have multiple devices. Additional information can be found here https://azure.microsoft.com/en-us/blog/announcing-the-preview-for-the-azure-data-box-achievements-will-be-unlocked/


· Azure File Sync is another new preview release that allows Azure File Share to sync with on-premises file servers. Cloud tiering is implemented that allows storing a certain amount of data locally and store a larger amount of data in the cloud. Azure File Sync is also integrated into Azure Backup. Additional information can be found here https://azure.microsoft.com/en-us/blog/announcing-the-public-preview-for-azure-file-sync/


I could go on all day about updates from Ignite so will provide links to everything else announced during the session!

· Azure Policy – https://azure.microsoft.com/en-us/services/azure-policy/

· Azure Migrate – https://azure.microsoft.com/en-us/blog/announcing-azure-migrate/

· FastTrack for Azure – https://azure.microsoft.com/en-us/programs/azure-fasttrack/

· Cloudyn – (Cost Management for Azure) https://blogs.microsoft.com/blog/2017/06/29/microsofts-acquisition-cloudyn-will-help-azure-customers-manage-optimize-cloud-usage/

Session 4: What’s new and upcoming in AD FS to securely sign-in your users to Office 365 and other applications

The ADFS session focused on what’s new and what’s coming in the future for ADFS for Office 365. As this was a shorter session I would highlight the key takeaways only.

· Passwords could soon be a thing of the past. Password less options for ADFS 2016


· How to get to password less authentication


· Extranet lockout for ADFS with known locations is coming soon. This feature will help user accounts from being locked out from failed external logon attempts.


· Resolve ADFS authentication issues faster using the help site – https://adfshelp.microsoft.com/

· ADFS Rapid Restore tool – https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/operations/ad-fs-rapid-restore-tool

That was enough for one day and it was time to leave the convention centre and head back to the hotel.

#SharePoint item count from all lists on all sub webs in SharePoint / #ProjectOnline #PPM #PowerShell

September 28, 2017 at 11:29 am | Posted in Add-on, Administration, Customisation, Functionality, Information, PowerShell, Reporting | Leave a comment
Tags: , , , ,

This is a supporting blog post for an example PowerShell script I quickly wrote for Microsoft’s Office 365 SharePoint Online. It was created after a query was posted on the Project Online TechNet forums asking how to easily check what sub sites were being used in PWA.

The code sample can be downloaded from here: https://gallery.technet.microsoft.com/Get-item-count-from-all-026a6db2

To get the script to work, there will need to be some environment variables set and a DLL available, these are detailed below.

Update the environment details:


Add the SharePoint Online / PWA URL, username and password for an account that is a site collection admin on the target site collection.

To get the script to work you will need to reference the DLL as seen in the image below:


This can be installed from the SharePoint Online Client components / management shell. I used the dll from the SharePoint Online Management Shell in this example.

Below you can see the output from the PowerShell ISE when running against my test SharePoint / Project Online site collection:


There are probably easier ways to view this information but I thought I would just try with a simple PowerShell script.

#ProjectOnline #PowerBI content pack 2 available #BI #Office365 #PPM

September 26, 2017 at 4:14 pm | Posted in Add-on, Administration, Customisation, Functionality, Information, Reporting | 5 Comments
Tags: , , , ,

2 years ago Microsoft released the first Project Online Power BI Content Pack, this week they have released another updated Project Online content pack! This is available now. For details on how to get the content pack see my original post below:


The steps are the same to get the new Project Online Content pack. This is version 2.3 as seen below:


Once the data is imported access the Report and Dashboard from the Power BI App > My Workspace navigation. I have set this up against our sales demo instance for Project Online. There are default reports for:

Portfolio Dashboard:image

Portfolio Timeline:image

Portfolio Costs:image

Portfolio Milestones:image

Portfolio Risks:image

Portfolio Issues:image

Resource Availability:image

Resource Overview:image

Resource Assignments:image

Resource Details – you will need to select a resource from the Resource Name filter:image

Resource Demand Forecast:image

Project Status – you will need to select a project from the Project filter:image

Project Risks & Issues – you will need to select a resource from the Project filter:image

Report Dashboard:image

Together with this content pack and the example report pack I built earlier this year, there are plenty of examples of reports to make Project Online reporting a simple task! A link to my report pack can be seen below:


Link #ProjectOnline tasks to #Planner #Microsoft365 #PPM #PMOT #MSProject

August 29, 2017 at 4:04 pm | Posted in Administration, Functionality, Information | Leave a comment
Tags: , , , , ,

In the latest release of Project Online Desktop Client, depending on the release channel that you are on, you might have noticed the new Planner button in the Task ribbon:


My Office version is on the Office Insider Fast channel so that I get the latest changes first but this will typically be controlled by your IT admins so you might need to wait a while until this feature reaches the Office release channel that you are on.

Hovering over the new button provides the details for this feature:


This feature allows you to create a hyperlink to the linked Planner Plan from the Planner icon in the indicators column. It could be that you have a bucket type task (sprint etc.) in the Project Online project then the detail tasks / activities might be in the linked Planner plan.

Select a task in the project then click the Planner button and a side pane will launch:


Click the “Link to existing Planner plan..” link then you will be able to type the name of the Office 365 Group that contains the Planner plan:


Start typing name of the group then select the correct group, in this example I have one called Pauls Test Plan:


Notice how it also states that it will add the resources assigned to the task into the group. Click the Create Link button:


It then shows that this task is now linked to that Planner plan:


You then get the hyperlink directly to the linked Planner Plan using the Planner icon in the indicators column or using the link in the Link to plan pane.

You can only link one task from the project plan to one Planner plan, if you try and link another task to the same Planner plan you will see this alert:


The resources added to the linked task didn’t get added to the group as suggested but as this feature is only in the Office Insider builds that might come when this is released in the other release channels. ***Update – this feature does work providing the PWA Resource email address matches the O365 user principle name. I believe other options are being explored***

For release details, see the article here: https://support.office.com/en-us/article/What-s-new-in-Project-2016-111bcaf9-bc27-4c15-80e6-85e726307520?ui=en-US&rs=en-US&ad=US#Audience=Office_Insiders

Running #ProjectOnline #PowerShell in #Azure using #AzureFunctions #PPM #Cloud #Flow #LogicApp Part2

August 1, 2017 at 4:32 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, PowerShell, Workflow | Leave a comment
Tags: , , , , , , ,

Following on from part 1 where I introduced the idea of automating certain Microsoft 365 PPM Project Online customisations using PowerShell, Microsoft Flow / Azure Logic Apps and Azure Functions, in part 2 I will set up an example automation for creating a Project Online event driven snapshot application on project published without having to set up any server or write any complied code! If you missed part 1 where this concept was introduced, see the link below:


Firstly I created an Azure Function app in my Azure subscription then created a new function based on the HttpTrigger – PowerShell template:


Give the function a name and set the Authorisation level – set the authorisation level to the correct setting for your function. Click Create. For details on Azure Functions, start here: https://docs.microsoft.com/en-us/azure/azure-functions/

You will then be presented with the function and sample code:


We will now create the PowerShell script to create the snapshot. This is based on a script I published a while back: https://pwmather.wordpress.com/2016/08/26/projectonline-data-capture-snapshot-capability-with-powershell-sharepoint-office365-ppm-bi/

The script has been updated to work in an Azure Function but also modified to use a parameter so that it only captures data for the published project, the PowerShell script can be seen further on in the post.

Firstly upload the SharePoint CSOM DLLs using the upload button:


I used the SharePoint CSOM DLLs from the SharePoint Online Management Shell:


Then enter the PowerShell code – screen shots below and code pasted below the images:




Code sample used in function:

# POST method: $req
$requestBody = Get-Content $req -Raw | ConvertFrom-Json
$projID = $requestBody.projID

# GET method: each querystring parameter is its own variable
if ($req_query_name) 
    $projID = $req_query_name 

#add SharePoint Online DLL - update the location if required
Import-Module "D:\home\site\wwwroot\ProjectSiteUserSyncHTTPTrigger\Microsoft.SharePoint.Client.dll"
Import-Module "D:\home\site\wwwroot\ProjectSiteUserSyncHTTPTrigger\Microsoft.SharePoint.Client.Runtime.dll"

#set the environment details
$PWAInstanceURL = "https://mod497254.sharepoint.com/sites/PWA2"
$username = "admin@MOD497254.onmicrosoft.com" 
$password = "password"
$securePass = ConvertTo-SecureString $password -AsPlainText -Force
#create the SharePoint list on the PWA site and add the correct columns based on the data required
$listname = "ProjectSnapShots"
$results1 = @()

#set the Odata URL with the correct project fields needed
$url = $PWAInstanceURL + "/_api/ProjectData/Projects()?`$Filter=ProjectId eq GUID'$projID'&`$Select=ProjectId,ProjectName,ProjectPercentCompleted"

#get all of the data from the OData URL
while ($url){
    [Microsoft.SharePoint.Client.SharePointOnlineCredentials]$spocreds = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass);    
    $webrequest = [System.Net.WebRequest]::Create($url)
    $webrequest.Credentials = $spocreds
    $webrequest.Accept = "application/json;odata=verbose"
    $webrequest.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")
    $response = $webrequest.GetResponse()
    $reader = New-Object System.IO.StreamReader $response.GetResponseStream()
    $data = $reader.ReadToEnd()
    $results = ConvertFrom-Json -InputObject $data
    $results1 += $results.d.results
        if ($results.d.__next){
    else {

#add data to snapshot list
#get PWA site client context
$ctx = New-Object Microsoft.SharePoint.Client.ClientContext($PWAInstanceURL) 
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($username, $securePass) 
$ctx.Credentials = $credentials 
#get the target list 
$List = $ctx.Web.Lists.GetByTitle($listname) 

#for each project, create the list item - update the newitem with the correct list columns and project data
foreach ($projectrow in $results1) 
   $itemcreationInfo = New-Object Microsoft.SharePoint.Client.ListItemCreationInformation 
   $newitem = $List.AddItem($itemcreationInfo) 
   $newitem["Title"] = $projectrow.ProjectName
   $newitem["ProjectId"] = $projectrow.ProjectId
   $newitem["PercentCompleted"] = $projectrow.ProjectPercentCompleted

The PowerShell code would need to be updated with your environment details: (PWAInstanceUrl, username, password and listname variables). Also the OData URL will need to be updated to include the project level fields that you want to snapshot.The target SharePoint list will also need to be set up in the PWA site collection for the project fields the script uses. This is the list I set up for this example:


SnapshotDate is set to Todays date so we don’t need to set that in the code.

The code is simple to follow but in summary the first part will get the projID from request body – we will pass in the ProjectID for the published project from the Flow / Logic App trigger. Then the SharePoint Online CSOM DLLs are imported in. Then the specific PWA environment details are set for the variables. The OData URL is then added to the url variable. Here notice we are filtering for the ProjectID and passing in the $projID variable we get from the request body. The Select part of the query will need to be updated for your project level fields. Next the code gets the data from the OData feed using the web request and adds the data into the results array. Once we have the data, we connect to the SharePoint list, in the example it is the ProjectSnapShots as set in the $listname variable. Lastly the new item is created in the list using the data from the results array.

Now the Azure Function is ready to be used. It can be tested using the Test option in the right hand panel, update the Request body:


Update it for a valid project ID. Then click Run above the function code:


The Logs window below will help you debug any errors etc.:


Then check the SharePoint list in the PWA site and the new item should have been created:


We now know the Azure Function is working as expected, now we need to call the Azure function when a project is published. All we need from the Azure Function is the URL to use, use the </>Get function URL button:


Select the correct Key, in this example I used the default function key. Copy the URL as it will be needed later.

To call the Azure Function when a project is published, the choice here for a no code option would be Microsoft Flow or Azure Logic App. For this I will use Microsoft Flow but the same steps (triggers , actions etc.) would be used in the Azure Logic App. Create a new Flow and search for Project Online:


Then select the Project Online – When a project is published trigger.

Enter the PWA URL:


Then click the ellipsis and set the connection for the PWA URL or create a new connection if needed:


Click + New step then Add an Action and search Http:


Select HTTP – HTTP:


Complete the HTTP action:

Method is POST, the Uri is the URL for the function that we copied earlier, Headers are not required. The Body is where we pass in the project ID from the published project trigger:


The Flow is now completed:


Now click Save flow.

In PWA, Publish a project or projects and see the snapshot data created on the configured snapshot list once the Flow has run:

Flow run:


Data added to the list for the project I published – in this example it was the Office 2016 rollout project:


This just shows a simple example and the some of the possibilities for extending the Project Online capability when making use of simple PowerShell scripts and other Microsoft 365 / Azure services for cloud / serverless solutions. Look out for more examples in the future.

Running #ProjectOnline #PowerShell in #Azure using #AzureFunctions #PPM #Cloud #Flow #LogicApp Part1

July 28, 2017 at 4:50 pm | Posted in Add-on, Administration, App, Configuration, Customisation, Fixes, Functionality, Information, PowerShell, Workflow | 4 Comments
Tags: , , , , , ,

Following on from my last post where I published an example solution starter PowerShell script for adding project team users to the Project Site, here I mentioned about running the script in an Azure Function and even running this sync from a Project Online event. The blog post can be seen below if you missed that:


Whilst I will use that example PowerShell script from my last blog post as an example, the concept will work for any PowerShell script.

I wont cover the details in setting up the Azure Function in part 1 as there is plenty of support out there for this – for this example I created an Http Trigger – PowerShell function.


I then uploaded the SharePoint DLLs and copied in the PowerShell script into the editor:


The project site user sync script didn’t work as is as I had to make some minor changes to get this to run from the Azure Function. This included change the way the SharePoint CSOM DLLs where loaded in. In the example script I used Add-Type to load the DLLs but in the Azure Function I had to switch this out to use Import-Module:


The next change I had to make was to comment out all of the feedback to the console, so all of the write-hosts. I also had to remove the functions within the script so that is was one block. After these changes I could execute the PowerShell script to add the project team members from my example project into the associated project site from the Azure Function. As this was an HTTP Trigger Azure Function, you can get the URL to the function and access that URL to execute the function.

This opens up lots of possibilities to easily execute this Azure Function from other applications that can make the HTTP call. For example you build easily execute this script once the project has been published either using a remote event receiver (RER) or a Microsoft Flow / Azure Logic App. The example script would need to be made generic and pass in a variable into the Azure Function for it to be a workable solution.

In part 2 of this blog post we will look at make a full event driven solution that is fired on project publish then executing the Azure Function and passing in a variable.

Next Page »

Create a free website or blog at WordPress.com.
Entries and comments feeds.