Original post : https://dynamicsaxinsight.wordpress.com/2019/10/10/extensible-data-security-policy-for-financial-reports/
In D365FO, Financial reports are stored in FinancialReports table in AxDB unlike in AX 2012 where they used to get stored in the reporting database and could be filtered per user through report library permissions feature in Management Reporter. However, we still can filter financial reports per user using the XDS policies.
SOLUTION:
Consider we need to configure security for a user such that he/she could only see reports under Housing Reports folder.
1. CREATE A QUERY
Create a query. Add FinancialReports table as a data source. Add range for field Folder. Set value to Housing Reports.
2. CREATE A SECURITY POLICY
Create a security policy. Set the properties as highlighted. Please note that we are using RoleProperty as ContextType. Further we are using the primary table, FinancialReports as the constrained table as well. That’s why, we are not adding any other constrained table to the policy. Lastly, set the query to the one created above.
3. SYNCHRONIZE THE DATABASE TO LET THE POLICY TAKE EFFECT.
4. CREATE A NEW SECURITY ROLE
Create a new security role or use an existing one to update the Security policy context string value to the context string value we used on the security policy. This binds the security policy with the security role and eventually to the user.
Make sure the role has relevant duties to maintain or view financial reports.
5. TEST
Login with the user which is assigned this security role and bingo see the magic! Only reports under Housing Reports folder are accessible to this user.
Use role-based security to restrict access HostBet to the financial reports folder by assigning specific user roles that allow visibility only to designated reports in D365 Finance.
ReplyDelete