Quantcast
Channel: CodeSection,代码区,网络安全 - CodeSec
Viewing all articles
Browse latest Browse all 12749

Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...

$
0
0

Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...
Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...
Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...

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 )

Further to my last post on an example method to security trim the Project data in a Power BI report for Microsoft’s Project Online PPM tool, another option is to merge the datasets / tables. If you didn’t see the first post, a link can be found below:

http://bit.ly/2hcHKnT

For this post, I have the same two ODATA / REST queries used, the ODATA one for the Milestones ( /_api/ProjectData/Tasks()?$Filter=TaskIsMilestone eq true ) which is not security trimmed and the REST one for the Projects ( /_api/ProjectServer/Projects ) which is security trimmed. With both of these datasets loaded into the Power BI Query Editor, select the Milestone dataset and click Merge from the Home ribbon tab and set the following:


Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...

This is merging my two tables based on ProjectId from the Milestone dataset and Id from the Projects dataset using a Left Outer join. You can see from that screen shot that I don’t actually have access to the Agile Product Development project in PWA as it is not returned in the list of projects in the REST dataset. Clicking OK will show a NewColumn:


Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...

Click expand and select Name:


Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...

That returns nulls for the project names you do not have access to:


Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...

These rows should be filtered out, click the Name column heading dropdown and de-select null:


Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...

Click OK and the Milestone dataset table will match the list of projects you have access to in PWA the rows with nulls in the Name column will be removed from the table. I then renamed the Milestones ODATA dataset to Filtered Milestones:


Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...

Click Close & Apply then the load a couple of visualisations on to the report and you can see that now the data is security trimmed as part of the query and not in the report:


Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...

In this simple example there is no need for the report level filter to remove the nulls at the report level like there was in the previous post. The same applies as with the previous post, if your users know Power BI / Power Query they can easily undo all of this and access all the data but this might be an option to explore.


Security trim Project data in #ProjectOnline #PowerBI #Excel #PowerQuery reports ...

Viewing all articles
Browse latest Browse all 12749

Latest Images

Trending Articles





Latest Images