Archive

Archive for the ‘Paul Mather’ Category

Security trim Project data in #ProjectOnline #PowerBI reports #PPM #Odata #REST #BI

December 9, 2016 Leave a comment
Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

The reporting API for Microsoft’s PPM solution – Project Online doesn’t filter the data based on the access model in PWA. For some organisations this can be problematic. In this blog post I show a simple report example to filter only projects and project milestones that I have access to in PWA.

In this example I have a very simple Power BI Report that is only using ODATA (_api/ProjectData), the Projects resource path to populate the Projects slicer / filter and the Tasks resource path to populate the Milestones for the selected Project:

image

I have access to a long list of projects (see the scroll bar on the slicer). Using the Audit Tracking project as an example, I can currently see this project in PWA as shown below:

image

I will change the access model so I get access denied to this project:

image

I only see these 6 projects projects in an unfiltered Project Center view:

image

Yet if I refresh my Power BI report I still see the full list as expected (the ODATA reporting API is not data security trimmed, you either access all data or none). One option is to use the REST (_api/ProjectServer) to filter the datasets that use the ODATA API as the source. The REST API is security trimmed to only show the data you have access to based on the access model in PWA. For example, I will get the list of Projects from REST to populate the Projects slicer / filter in Power BI, this only shows the projects I have access to in PWA. I have added a new data source to my simple Power BI report for the REST API:

image

The join is then set up on Id from the Projects REST dataset to the ProjectId in the Milestones OData dataset:

image

I now switch my slicer / filter to use the Projects – REST dataset

image

As you can see the list of projects matches what I see in the Project Center but there is a also a blank option there. The blank value is for rows it can’t join with on the Milestone ODATA dataset, these are the projects I no longer have permission to access in PWA! To resolve this, select the page and add a report level filter like below where Name is not blank:

image

This report filter will not show any blank values for the Name field on any visualisation in the report:

image

The blank value is now removed. My data is now security trimmed to match what I have access to in PWA! Obviously if you know what you are doing you can just undo all of this and see all data but for some it might be a workable solution! You can do the same with Resources too.

Categories: Paul Mather, Work Tags:

#ProjectOnline new #OData resource path for Resource Demand #Reporting #BI #O365 #PPM

November 22, 2016 Leave a comment
Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

This post covers a new resource path in the OData endpoint for Microsoft’s PPM tool Project Online to give you the data you need for true resource demand for project assignments and resource engagement assignments. Before resource engagements were introduced, you could have assignments in the project plans or in the resource plans. For reporting, the data was available in the Assignments and the AssignmentTimephasedDataSet resource path feeds, normal project assignments data would be in the AssignmentWork field and resource plan work was in the AssignmentResourcePlanWork field. There was also an AssignmentCombinedWork in the AssignmentTimephasedDataSet feed that displayed the correct resource demand for the resource when you used both resource plans and project plans. The AssignmentCombinedWork field would take into account for the project resource utilisation calculation options. With the introduction of resource engagements there wasn’t a single field that gave you this same resource demand data – until now!

If you regularly view the Project OData service root URL (_api/ProjectData) you might have noticed a new feed, ResourceDemandTimephasedDataSet. This feed has the following properties:

image

The ResourcePlanUtilizationType type will display either a 0, 1 or 2. This is the property to indicate the project resource utilisation calculation options for the project. The enumeration for these values is below:

  • o = Project Plan
  • 1 = Resource Engagements
  • 2 = Project Plan Until

The ResourcePlanUtilizationDate property will only contain a date when the “Project Plan Until” resource utilisation calculation option is set.

This new ResourceDemandTimephasedDataSet feed will show the true resource demand for the project resource utilisation calculation option when using both project assignments and resource engagements. Some scenarios below show when data would and wouldn’t be included in this new feed:

Scenario 1: Project plan has resource assignments and resource engagements. The “Calculate Resource Utilization from:” option is set to Project Plan. In this scenario only the project assignments will be included in the ResourceDemandTimephasedDataSet feed.

Scenario 2: Project plan has resource assignments and resource engagements. The “Calculate Resource Utilization from:” option is set to Resource Engagements. In this scenario only the resource engagement assignments will be included in the ResourceDemandTimephasedDataSet feed.

Scenario 3: Project plan has resource assignments and resource engagements. The project assignments start from the 20th November to the 10th December 2016. The Resource engagements start from the 25th November to the 20th December 2016. The “Calculate Resource Utilization from:” option is set to Project Plan until with a date set to 1st December 2016. In this scenario only the project assignments will be included from the 20th November 2016 up to and including the 1st December 2016 and only resource engagement assignments from the 2nd December to 20th December 2016  will be included in the ResourceDemandTimephasedDataSet feed.

Example data can be seen below:

image

That makes things far easier for reporting resource demand, without this new feed you had to use the AssignmentTimephasedDataSet feed and the EngagementsTimephasedDataSet feed and join the datasets.

Categories: Paul Mather, Work Tags:

#ProjectServer and #SharePoint 2013 / 2016 November 2016 Cumulative Update #PS2013 #SP2013 #PS2016 #SP2016 #MSProject

November 8, 2016 Leave a comment
Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

The Office 2016 November 2016 updates and cumulative updates are now available, please see the links below:

http://bit.ly/2fCbbev

Project 2016 November 2016 update:
http://bit.ly/2eJY8tK

SharePoint Server 2016 / Project Server 2016 November 2016 update:
http://bit.ly/2fCavG2 & http://bit.ly/2eJZpkt & http://bit.ly/2fCftm0

The Office 2013 November 2016 updates and cumulative updates are now available, please see the links below:

http://bit.ly/2fCbbev

Project Server 2013 November 2016 CU Server Roll up package:
http://bit.ly/2eK2oJI

Project Server 2013 November 2016 update:
http://bit.ly/2fCdoXq

Project 2013 November 2016 update:
http://bit.ly/2eK7FBl

Also worth noting, if you haven’t done so already, install Service Pack 1 http://bit.ly/1uorn2C first if installing the November 2016 CU.

As always, fully test these updates on a replica test environment before deploying to production.

Categories: Paul Mather, Work Tags:

Update #ProjectOnline Resource custom field values using #PowerShell with data from #AzureAD user attributes #PPM #Offce365 #ProjectServer #CSOM

November 7, 2016 Leave a comment
Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

This blog post will demonstrate a simple example of how Microsoft’s PPM tool, Project Online, can include / sync metadata from Azure AD user attributes to resource custom fields in Project Online. This example script will update the resource custom field “Job Title” on my test tenant with the data from the Azure AD user “Title” attribute.

This script example can be downloaded here: http://bit.ly/2exqPXw

The script does require some additional modules / DLLs to work. Firstly you will need the Azure AD module installed, this can be downloaded here: http://bit.ly/2fV43Ou. You will also need the SharePoint Online and Project Online CSOM DLLs. The DLL’s used are from the NuGet package here: http://bit.ly/2eMprBu. There are later version available, check here: http://bit.ly/1SO8x4X. Download those as required. These modules can be seen here on line 3,5 and 14 in the example script, the location will need to be updated to reference the correct location for your SP / PS Online CSOM DLLs.

The user setting up the script will need to update the correct location to the DLLs required, the AD username, AD password, CSV file location, PWA instance URL, username, password and the custom field internal name. The PWA account specified will need edit access to all of the resources in PWA and the AD account will need access to read all the users in Azure AD. Ensure the variables have been updated correctly, placeholder values seen below:

image_thumb.png

In this example all users in the Azure AD will be exported, clearly if you have a large organisation it would be efficient the filter for only those users that exist in Project Online. The code matches users and resources based on the AD display name and PWA resource name when updating the resources in PWA.

To get the correct custom field internal ID I use the REST API, <PWA Site URL> + /_api/ProjectServer/CustomFields. Find the resource level custom field and copy the InternalName as seen below:

image_thumb.png

Once the PowerShell script has been updated, save it and it can then be tested on a test / non-production environment. Once executed in PowerShell, each resource found in the CSV file will be outputted as seen in the example below. In this example there are many AD users in the CSV export that do not exist in the PWA instance.

image_thumb.png

Checking in the Resource Center after the script has run you can see for the resources that exist in the CSV file created, the Job Title has been updated with the values found in Azure AD / the export CSV file:

image_thumb.png

The CSV file generated can be seen here:

image_thumb.png

This PowerShell script could be run on a schedule from a server on-prem or even in Azure / webjob. The script would just need access to save / access a CSV file and the DLLs / modules required. Fully test this script on a test / non-production PWA instance before running on a Production PWA instance.

The script is provided “As is” with no warranties etc.

Categories: Paul Mather, Work Tags:

Update #ProjectOnline Project custom field values using #PowerShell with data from a CSV file #PPM #ProjectServer #CSOM

November 6, 2016 Leave a comment
Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

This blog post will demonstrate a simple example of how Microsoft’s PPM tool, Project Online, can include data from an external system. This is a very simple example using a demo CSV mock up of data that could be from an external system. The CSV part could easily be replaced by a SQL query or a REST API query to the source system etc.

Example CSV data used can be seen below:

image

As you can see, my imagination for example project names has not improved! The code uses the Project Name as the key between the two data sets – the CSV file and PWA so the names will need to match.

This script example can be downloaded here: http://bit.ly/2edq0Ii

The user setting up the script will need to update the correct location to the DLLs required, the PWA instance URL, username, password, the custom field internal name and the location of the CSV file. The account specified will need edit access to all of the projects in PWA. Ensure the variables have been updated correctly, placeholder values seen below:

image

image

The DLL’s used are from the NuGet package here: http://bit.ly/2eMprBu. There are later version available, check here: http://bit.ly/1SO8x4X. Download those as required.

The get the correct custom field internal ID I use the REST API, <PWA Site URL> + /_api/ProjectServer/CustomFields. Find the project level custom field and copy the InternalName as seen below:

image

Once the PowerShell script has been updated, save it and it can then be tested on a test / non-production environment. Once executed in PowerShell, each project found in the CSV file will be outputted as seen in the example below. In this example two projects exist in the CSV data but not in my example Project Online PWA instance (remember for this example, the names need to match in the CSV file and PWA):

image

Checking in the Project Center after the script has run you can see for the projects that exist in the CSV file, the project budget includes the values found in the CSV file:

image

This PowerShell script could be run on a schedule from a server on-prem or even in Azure. The script would just need access to the data to import (CSV file etc.) and the DLLs. Fully test this script on a test / non-production PWA instance before running on a Production PWA instance.

The script is provided "As is" with no warranties etc.

Categories: Paul Mather, Work Tags:

Last logon time for the #ProjectOnline PWA users report #PPM #PowerBI #PowerQuery #Office365 #SharePoint #BI part 2

October 12, 2016 Leave a comment
Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

This is last post in this mini series for the last connect / last logon feature for Project Online, Microsoft’s PPM tool. In this post we will create the Power BI report. For those that missed the previous post see the links below, check these out first:

Firstly, capturing the last logon time: http://bit.ly/2dj9PpV

Secondly, part 1 of the report creation – setting up the dataset queries in preparation for this post: http://bit.ly/2e0BDNU

If you are continuing where we left off after part 1, open the saved Power BI report:

image

We have the blank canvas ready to add the data and visualisations. In the blog post we I cover creating the report below, Power BI has many options which we don’t cover here but all are intuitive so have a play!

Page 1 – PWAUsage:

image

Page 2 – PWAUserLastConnectDate:

image

Before we start, the report example I created uses a custom visual from the gallery for the Browser filter, this can be downloaded here: http://bit.ly/2dJJsuP or alternatively just use the default slicer visual like the one used for the Username filter.

Once the custom visual is imported (or choose to use the default slicer), expand the PWAUage dataset, this is the one we will use for this first page:

image

The first visual we will add is the bottom left pie chart for “Logon by Browser”, from the PWAUsage dataset select Browser and Id:

image

It defaults to the Table visualisation, change this to the Pie chart in the Visualizations pane:

image

Drag Id from Details into Values:

image

Drag the visual to the bottom left corner of the page. In the Visualizations settings pane, click the roller to access the settings, here you can change the settings as needed, for example I turned on the Legend and update the Title:

image

The next visualisation to add is the PWA Usage Details table, click anywhere on the page so no visualisations are selected then from the PWAUsage dataset select Browser, Logon Data and Username:

image

By default, the Logon Date will be broken down into the date hierarchy, change this in the visualisation settings, select Logon Date:

image

Move the visualisation to the bottom center of the page and click the Logon Date column to change the order by so the latest date is in the first row:

image

With the visualisation selected, click the roller in the visualisations settings pane to update the settings as needed. I updated the title, the grid settings, the text size for the data and changed the column order:

image

The next visualisation to add is the Hits Per User bar chart, click anywhere on the page so no visualisations are selected then from the PWAUsage dataset select Browser, Id and Username:

image

Change the visualisations from a table to a Stacked bar chart and move Id to Values and Browser to the Legend:

image

Move the visualisation to the center of the page and extend it to the right hand side of the page by dragging it:

image

The same process as before, update the visualisation settings as required by clicking the roller. I updated title, increased the size of the legend text and turned on data labels.

The next visualisation to add is the Last Refresh table, click anywhere on the page so no visualisations are selected then from the PWAUsage dataset select Last Refreshed, resize the visualisation and move it to the top right hand corner of the page:

image

Update the visualisation settings as required by clicking the roller. I added a title and increased the size of the data text:

image

Add a text box to the top of the page and enter the report title, change the settings as required:

image

The next visualisations to add are the cards showing the totals, the process is the same for all so I will only cover adding one in detail. Click anywhere on the page so no visualisations are selected then from the PWAUsage dataset select Id, change the visual from a table to a Card:

image

Move the visual to the bottom right corner of the page, resize it and update the settings as required, I added a title, removed the category label and increased the size of the data label:

image

Add 5 more cards, select the one already created then copy and paste it 5 times then place them in the correct location on the page as required:

image

The 5 additional visualisations need different settings applied as these will show the hits per Browser. To update them, select one so that the settings are visible. Drag Browser from the PWAUsage dataset to the Visual level filters setting:

image

Select IE:

image

Now update the title from Total Hits to Total IE Hits:

image

Repeat this for the other 4 cards but set one for Chrome, Edge, Firefox and Other so you end up with this:

image

The final visualisations to add to this page are the filters, with no visualisation selected, select Username from the PWAUsage dataset, change this from a table to a slicer and change the settings as required. I added a title, turned off the header row, turned of Select all and turned off single select:

image

Now repeat this but select Browser and change it to the Chiclet Slicer:

image

Change the settings as required, I added a title, turned off the header row and set it to have 2 columns:

 image

That is the first page set up, rename the page and it is completed:

image

So here you can see some useful stats around the PWA usage.

Click the + next to the first page to add a new page and rename this to PWAUserLastConnectDate:

image

Now expand the PWALastLogon dataset and select both fields, change the column order so Resource name is first then change the row order so the Resource Name is alphabetical:

image

Change the settings as needed, I added a title, turned off the horizontal grid line and increased the text size. Now add a text box to the page to add the report title:

image

On this page you can quickly see who has logged in and when plus who has never logged in since adding the JavaScript to the Project Web App homepage – unless of course they always by pass the PWA homepage or the pages where you added the JavaScript!

There are lots of options available, have a play and build great dashboards! If you used the Chiclet slicer here is a cool option to add:

image

It supports Image URLs, for this I updated the PWAUsage dataset and added a new column called Browser URL:

image

As you can see this is an if statement, based on the Browser a certain URL is set to display the correct logo for each browser, either save the images to a site you have access to or use images from the internet. Then on the report designer I set the Browser URL to be an Image URL on the Modelling tab:

image

Then update the Chiclet Slicer settings:

image

Once completed save and publish your report to Power BI or you can just use it from Power BI Desktop if needed.

Power BI offers great report visualisations, this is just a simple example, see what you can come up with!

Categories: Paul Mather, Work Tags:

#ProjectServer and #SharePoint 2013 / 2016 October 2016 Cumulative Update #PS2013 #SP2013 #PS2016 #SP2016 #MSProject

October 12, 2016 Leave a comment
Paul Mather
I am a Project Server and SharePoint consultant but my main focus currently is around Project Server.
I have been working with Project Server for nearly five years since 2007 for a Microsoft Gold Certified Partner in the UK, I have also been awared with the Microsoft Community Contributor Award 2011.
I am also a certified Prince2 Practitioner.

This article has been cross posted from pwmather.wordpress.com (original article)

The Office 2016 October 2016 updates and cumulative updates are now available, please see the links below:

http://bit.ly/2dL3HKL

Project 2016 October 2016 update:
http://bit.ly/2e0Bf35

SharePoint Server 2016 October 2016 update – Project Server 2016 fixes:
Nothing for Project Server 2016 at the moment

The Office 2013 October 2016 updates and cumulative updates are now available, please see the links below:

http://bit.ly/2dL3HKL

Project Server 2013 October 2016 CU Server Roll up package:
http://bit.ly/2dL3fMV

Project Server 2013 October 2016 update:
http://bit.ly/2cUQoH9

Project 2013 October 2016 update:
http://bit.ly/2dL3vLQ

Also worth noting, if you haven’t done so already, install Service Pack 1 http://bit.ly/1uorn2C first if installing the October 2016 CU.

As always, fully test these updates on a replica test environment before deploying to production.

Categories: Paul Mather, Work Tags:
%d bloggers like this: