#ProjectOnline project user sync to project sites #PPM #O365 #PowerShell #SharePoint

July 7, 2017 at 4:13 pm | Posted in Add-on, Administration, App, Customisation, Functionality, Information, PowerShell, Workarounds | 1 Comment
Tags: , , , ,

This is a supporting blog post for an example solution starter PowerShell script I wrote for Microsoft’s Office 365 PPM tool Project Online. With the great improvement from Microsoft to now support up to 30,000 Projects and Project Sites in one Project Online Project Web App site collection, there are some limitations such as not being able to sync the users to project sites outside of the PWA site collection. For details on this change see the post here:

https://pwmather.wordpress.com/2017/06/14/projectonline-project-site-settings-location-sharepoint-ppm-o365-msproject/

This solution starter script just demonstrates one method to sync the project team members into the associated Project Site-  the concept would also be useful when using the SharePoint permission mode in PWA. The example script is fixed to one example project / project site and only adds the team members to the members SharePoint group on that site. It doesn’t loop through all projects  or remove users from the project sites etc. This could all easily be done but is beyond the scope of the code sample / solution starter.

The code sample / solution starter can be downloaded from here: https://gallery.technet.microsoft.com/Online-User-Sync-to-7a75ef77

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

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

image

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.

You will then need to update the environment detail placeholders as seen below:

image

Add the Full PWA URL, username and password for an account that is a full admin on the PWA site collection. Select an example project to test with on a non-production PWA project / project site. Use a project that is not syncing the users to the project site automatically – for example a project site outside of the PWA site collection. Copy the Project GUID – it will be similar to this: 4b75dfb8-4051-e711-80c9-00155da85037 and update the script with the project GUID. An easy way to get the Project GUID is from the PWA PDP URL when accessing the project. For the same project, copy the full project site URL and update the script then find the name of the correct SharePoint group to add the users to. For example it could be the members group. The groups can be found from the project site > Settings cog > Site Settings > Site Permissions.

Once these variable placeholders are set, save the script. Run the script using PowerShell and you will see the users added to the specified group on the project site. Fully test this on a non-production PWA instance first. The code should really be updated to production standard code before using on a production PWA instance and handle removing users, adding users to different permissions groups based on role and dynamically getting the projects and project site urls etc.

Below you can see the output from the PowerShell ISE when running against my example project  / project site on my test PWA instance:

image

Looking at the project site you can see the users here:

image

A production version of the PowerShell script could be set to run each day / night etc. as required. The code could also easily be run using an Azure Function and executed from a URL – you could then build is an event driven type user sync – more on that in my next blog post.

The script is provided "As is" with no warranties etc. – this is just a free solution starter so is use at your own risk.

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

October 12, 2016 at 4:46 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, Reporting, Workarounds | Leave a comment
Tags: , , , , ,

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: https://pwmather.wordpress.com/2016/09/30/want-to-capture-the-last-logon-time-for-the-projectonline-pwa-users-ppm-javascript-office365-sharepoint/

Secondly, part 1 of the report creation – setting up the dataset queries in preparation for this post: https://pwmather.wordpress.com/2016/10/10/last-logon-time-for-the-projectonline-pwa-users-report-ppm-powerbi-powerquery-office365-sharepoint-bi-part-1/

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: https://app.powerbi.com/visuals/show/ChicletSlicer1448559807354 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!

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

October 10, 2016 at 4:21 pm | Posted in Add-on, Administration, Configuration, Customisation, Functionality, Information, Reporting, Workarounds | 2 Comments
Tags: , , , , ,

Following on from my last post where I published an option / workaround for the last connected feature that has been removed from Project Online, this post will look at generating a Power BI report for the usage data that is captured. For those of you that missed the last post, see link below before continuing:

https://pwmather.wordpress.com/2016/09/30/want-to-capture-the-last-logon-time-for-the-projectonline-pwa-users-ppm-javascript-office365-sharepoint/

Now that we have some data captured in the list we can generate a report, for this example report I have used Power BI and Power Query but you could do something similar in Excel Power View with Power Query or even JavaScript / HTML if you really wanted to. In this post I will walkthrough all the steps needed to start creating the example report seen below:

Page 1 (PWAUsage):

image

Page 2 (PWAUserLastConnect):

image

So firstly we need to two URLs for the data used to generate this report, the first one is from the PWAUsageList, this assumes the list is called PWAUsageList, update the URL as needed:

<PWA URL>/_api/Web/Lists/GetByTitle('PWAUsageList')/Items()?$Select=WhoString,LogonDate,Browser,Id

The next one is from the Project OData Reporting API to return the active users that have an account:

<PWA URL>/_api/ProjectData/Resources()?$Filter=ResourceIsActive eq true and ResourceNTAccount ne null

Now launch Power Bi Desktop and click Get Data > OData Feed:

image

Enter the URL for the PWAUsageList as seen in the example above and click OK then click the Edit button on the preview window and the Query Editor window will open. Change the Query name from Query1 to something meaningful such as PWAUsage. Now change the LogonDate Column to Date rather than Date/TIme by right clicking on the column heading > Change Type > Date:

image

Also rename any columns as needed and remove the duplicate ID column, I renamed LogonDate to Logon Date and WhoString to Username:

image

Now we will add a custom column to this query to get the “Last Refresh” date. To do this click the “Add Column” ribbon then “Add Custom Column” and complete the details:

image 

Click OK and the dataset will update:

image

Now we need to add the Resources data source, in the query editor click Home > New Source > OData Feed and enter the Resources OData URL as seen in the example above and click OK then click OK on the data preview window. Now click Choose Columns, the only column needed is ResourceName:

image

Click OK. The ResourceName column was then renamed and the Query renamed too:

image

Now we need to create a third query table that contains data from the PWAUsage query and the ActivePWAUsers query to show the last logon time for each PWA User. We could keep just the two queries and merge the two without creating a third table but that is up to you, you would just chose the Merge Queries option if you wanted to have just two queries. For this post I will create a third dataset query. In the query editor click the Merge Queries > Merge Queries as New option:

image

ActivePWAUsers in the top table and PWAUsage is the bottom table, select Resource Name in the top section and Username in the bottom section. The default join kind is fine for this merge:

image

Click OK. Update the query name to something meaningful such as PWALastLogon.

image

Click the Expand button next to the NewColumn:

image

Change the radio button to Aggregate and then click the dropdown next to Logon Date and select Maximum, don’t select anything else:

image

Uncheck the option “Use original column name as prefix” then click OK:

image

Rename the new column to remove the “Max of” and call the column “Latest Logon Date”

We now have the three queries ready to load into the report:

image

Now click Close & Apply > Close & Apply from the Home ribbon menu and the report will show your queries available:

image

The first thing to do will be to ensure the relationships between the three datasets is correct. Click the relationships button from the left navigation and update as needed:

image

All I had to change was to join PWAUsage to ActivePWAUsers by dragging Username from PWAUsage to Resource Name in ActivePWAUsers.

Now click back to the report view and we are ready to design the report. Now we have the datasets ready, in part 2 we will look at creating and designing the report, for now ensure you save the Power BI report for later when we look at designing the report.

#ProjectServer / #ProjectOnline error opening Enterprise Resource Pool #MSProject #Office365 #PPM

October 10, 2016 at 8:17 am | Posted in Administration, Functionality, Information, Issue, Workarounds | Leave a comment
Tags: , , , , ,

A quick post to highlight an issue and workaround for opening the Enterprise Resource Pool in Project Pro using the Open button on the Resources tab in the Resource Center:

image

If you try and click the Open button with no resources selected in the grid you will get the error below:

“This action couldn’t be performed because Office doesn’t recognize the command it was given” :

image

Select at least one resource in the grid then this command will work fine.

Error creating Project Sites from custom site template in #ProjectOnline / #SharePoint Online #PPM #Office365

September 1, 2016 at 4:30 pm | Posted in Administration, Configuration, Customisation, Fixes, Functionality, Information, Issue, Workarounds | Leave a comment
Tags: , , , , ,

A quick post, if you are finding that all of a sudden your project sites are failing to create with the error below:

CreateWssSiteContent: Creating project site failed! Project Uid= <site details> Microsoft.SharePoint.SPException: The site template requires that the Feature {e995e28b-9ba8-4668-9933-cf5c146d7a9f} be activated in the site collection. at Microsoft.SharePoint.Utilities.SPUtility.ThrowSPExceptionWithTraceTag

Chances are you using a custom site template and this stopped working within the last week or so. The feature ID SharePoint is complaining about is a “MobileExcelWebAccess” feature. This can’t just be enabled.

The fix is straightforward, locate the site which you used to create the site template and save that site as a template again with a different name / version then link this to the Enterprise Project Type/s. Repeat this for all custom site templates.

#ProjectOnline / #ProjectServer reporting on auto / manually scheduled tasks #BI #Office365 #Excel #PowerQuery #PS2013

April 13, 2015 at 9:49 am | Posted in Add-on, Administration, Configuration, Functionality, Information, Reporting, Workarounds | 1 Comment
Tags: , , , , , , ,

One issue or query that has been raised a few times is that when reporting on manually scheduled tasks and auto scheduled tasks the Start / Finish date fields do not show the same data that they do in Project or PWA for the manually scheduled tasks. For example, take a look at the example project plan below:

image

If I generate a reporting for this project using the equivalent fields from the OData API, see below:

image

As you can see all tasks have start and finish dates. The Manually scheduled tasks that are either blank or have text displayed in Project Pro contain dates in the report. These default to the Project Start date. The OData query used is below:

Tasks()?$Select=ProjectName,TaskName,TaskStartDate,TaskFinishDate,TaskIndex

This can be quite misleading from a reporting point of view. There are two options (probably more but two documented here!), these are detailed below in order of preference:

Option 1:

The preferred option would be to create a calculated field in the report, in this example, as I am using Excel I will create this in Power Query. I have my dataset in the Power Query Editor like below:

image

The OData query used is below:

Tasks()?$Select=ProjectName,TaskName,TaskStartDate,TaskStartDateString,TaskFinishDate,TaskFinishDateString,TaskIsManuallyScheduled,TaskIndex

Now click Add Column > Add Custom Column:

image

Give the column a name then create the formula:

image

Click OK to add the new custom column, repeat for the finish date:

image

After re-ordering and removing some columns my dataset now looks like this in the Query Editor:

image

The final change is to update the Data Types of the columns, in this example I updated the TaskStartDate and TaskFinishDate columns to Date/Time and my calculated DisplayedStartDate and DisplayedFinishDate columns to Text:

image

Now I am happy with the query I click the Close & Load button on the Home tab:

image

This will load my data into Excel:

image

As you can see the data displayed in my calculated columns on my report match the data in the fields on my Project Plan:

image

Option 2:

The other option is to create new Enterprise Custom Fields in Project Online that are calculated. Using Start date as an example, create a task level text field that is based on  formula, the formula would be =[Start]. I have called the field “DisplayedStartDate”. In Project Pro:

image

In my updated Excel Report:

image

The OData query used is below:

Tasks()?$Select=ProjectName,TaskName,TaskStartDate,TaskFinishDate,DisplayedStartDate,TaskIndex

As you can see this also gives the correct data but does introduce two additional calculated task level fields in your Project Online configuration. It is recommended to keep the task level calculated fields to a minimum – ideally below 5 for performance reasons hence this option being the least preferred. 

#ProjectServer 2013 Project Center view failed to load #PS2013 #SP2013

November 20, 2013 at 10:33 am | Posted in Administration, Configuration, Customisation, Fixes, Functionality, Information, Issue, Workarounds | 2 Comments
Tags: , , , ,

I have seen this issue a few times now in Project Server 2013 where users see the error “View Failure The view failed to load. Press OK to reload this view with the default settings. Press Cancel to select another view”

image

Clicking OK gives another error: “You don’t have permissions to view any projects”

image

This isn’t the case in this example.

There are two scenarios that I know of that cause this particular issue, these are described below:

Note: My farm is in the Project Server permission mode.

For an existing user:
•    Log in as User A, access the Project Center, access “View A” – all works great
•    Change the permissions so that User A no longer has access to “View A” or delete “View A”
•    Log in as User A, access the Project Center, User A will see the View failed to load error

For a new user – never accessed the farm before:
•    Prevent access to the default Project Center “Summary” view for the Team Members Group but allow access to other Project Center views
•    Create a new user (User B) that is only in the Team Members Group
•    Log in as User B (a new user on the farm), access the Project Center, User B will see the View failed to load error

The ULS logs gives the following error:

Error is: GeneralSecurityAccessDenied. Details: User does not have permission to this view. . Standard Information: PSI Entry Point:  Project User: i:0#.w|support\userb Correlation Id: 2f5e74c7-c751-e311-9419-00155d15d154 PWA Site URL: http://vm753/PWA SA Name: ProjectServer PSError: GeneralSecurityAccessDenied (20010), LogLevelManager Warning-ulsID:0x347A6230 has no entities explicitly specified.               ea70589c-4f64-e059-ef52-a016cf63c1ed

InitViewReportInfo ViewUid:63d3499e-df27-401c-af58-ebb9607beae8 is not found.        ea70589c-4f64-e059-ef52-a016cf63c1ed

The remote command PWAProjectGetProjectCenterProjectsForGridJsonRemoteCommand encountered an unexpected exception. ea70589c-4f64-e059-ef52-a016cf63c1ed

If you have removed the default Project Center Summary view, either removed access to it or deleted it (new user scenario), or removed any other Project Center views that users may have accessed last (existing user scenario), the known workaround at this point is as follows. Click the Projects Tab, select a view from the view menu then refresh the page. At this point the view will load and the Project Center will continue to load successfully.

Changing #SharePoint Central Admin Regional Settings stops the #PowerPivot Dashboard timer job #SP2013 #PS2013

November 1, 2013 at 11:22 am | Posted in Administration, Configuration, Customisation, Fixes, Functionality, Information, Issue, Reporting, Workarounds | 1 Comment
Tags: , , ,

Take care when updating the Central Admin regional settings as certain things stop working. The link to update the region settings doesn’t exist on the Site Settings menu probably for this reason but you can type the URL manually and access the page. Just add _layouts/15/regionalsetng.aspx to the URL.

Central Admin region settings were updated to English (United Kingdom), which is ID 2057.

An example of functionality that stops working is the PowerPivot Dashboard Processing Timer Job:

image

For the benefit of the search engines:

‘The Execute method of job definition Microsoft.AnalysisServices.SPAdding.UsageProcessingTimerJob(ID 5144359a-e86d-429f-8a5c-8c06cca109ee) threw an exception’

The following error is thrown in the URL logs:

image

For the benefit of the search engines:

Failed to load ‘http://sp13:15000/PowerPivot%20Management/567b4062-7a0b-4b24-a7f5-994bbed90cf1/2057/Server%20Health.xlsx&#8217; with error: ‘The workbook does not exist at the specified location’

This error lead us to the fix. Notice the 2057 in the URL. Navigating the the PowerPivot Management library, there was no 2057 folder, only a 1033 folder.

A 2057 folder doesn’t exist, on 1033 – for English (United States):

image

At this point you can either create a a new folder for the correct locale in this case 2057 for English (United Kingdom), then copy the 3 documents shown below from the 1033 folder to the 2057 folder:

image

The timer job will now run successfully and the dashboard will update. The other option is to set the regional settings for Central Admin back to English (United States) – probably the recommended fix!

The the Dashboard will update and show data:

image

#ProjectServer #PS2013 / #SharePoint #SP2013 site template issue

September 4, 2013 at 10:02 am | Posted in Administration, Configuration, Customisation, Functionality, Information, Issue, Workarounds | 2 Comments
Tags: , , , , , ,

When creating new site templates in SharePoint 2013, ensure you check the box to include content. If you don’t do this, any sites created from your new template will have the “Change the look” functionality missing, it will load a blank page as shown below:

image

To resolve this, include the content when saving the new site template. Ensure that there is no test data on the lists / libraries etc.

Include content enabled:

image

After creating a site from this new template, the “Change the look” functionality will work as expected:

image

#ProjectServer #PS2013 #Excel Pivot Table limitation

July 4, 2013 at 11:38 am | Posted in Administration, Customisation, Functionality, Information, Issue, Reporting, Workarounds | 1 Comment
Tags: , , , , ,

Just a quick post to highlight a limitation / issue with Excel Pivot Tables that I hadn’t seen before, details below.

This particular Pivot Table uses a Data Model that contains two OData feeds from Project Server 2013, one for Project details and one for Task details. The connections can been seen below:

image

The relationship has been set up as follows:

image

I have added Programme, Project Name, Task Name and Task Start to the Pivot Table. Programme and Project Name are from the Projects table and Task Name and Task Start are from the Tasks table. The Project Name is filtered to just one project:

image

Looking at the Pivot Table, it looks the CPS Test project has many tasks but in fact this project only has 4 tasks:

image

To resolve the issue you have to add a numerical field from the Tasks table to correct the aggregation:

image 

Hope that helps Smile

Next Page »

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