Microsoft recently removed the Last Logon details from the Manage Users page in PWA settings for Project Online – Microsoft’s PPM tool. This simple script is an alternative solution that will capture the last logon for the Project Web App users. It wont capture the last logon from Project Professional or if a user accesses the API’s etc., it will only capture the last logon from the page the script is added to. In this example I have added the script to the homepage, so if a user has the Project Center saved as a favourite link and bypasses the PWA homepage then their logon would not be captured. You could add the script to multiple PWA pages if required.
When a user accesses the PWA homepage for the first time that day, an item is created on the SharePoint list in the PWA site, it only captures the logon once per day. See an example on my demo instance:
It captures the user name, the logon data and the browser that was used. This list will need to be created manually with the following details:
List Name: PWAUsageList
The LogonDate column setting defaults to Today:
That is it, it will now capture the users who access the PWA homepage. Once you have the data on the list you can then create a report for that data. I will publish a blog post in the next week or so that details this but for now here is an example report screen shot in Power BI:
Fully test this on a non-production PWA instance before rolling out to Production, the script is provided As Is with no warranties etc. Try it out and let me know what you think.