Hello,
We have an issue where a user has access to records to which he really shouldn't have access. I went through all of the obvious and not-obvious ways of diagnosing the problem (more on that here: community.dynamics.com/.../261866) and the only option I can think of now is to analyse the trace logs and go from there.
But I can't figure out how to find the line where the system decides that the user has access. What are some keywords I should be looking for?
*This post is locked for comments
Hi Alexandr,
use this two queries to find where your user take access privilege.
Change prvCreateOpportunity with your privilege/entity, like "prv" + "privilege name" + "entity name" (prvReadContact or prvCreateAccount or whatever else).
Please let me know if you solve.
User Query
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'> <entity name='privilege'> <attribute name='name' /> <link-entity name='roleprivileges' from='privilegeid' to='privilegeid' alias='pu' link-type='inner' > <link-entity name='role' from='roleid' to='roleid' alias='rpu' link-type='inner' > <attribute name='name' /> <link-entity name='systemuserroles' from='roleid' to='roleid' alias='sr' link-type='inner' > <link-entity name='systemuser' from='systemuserid' to='systemuserid' alias='srr' link-type='inner' > <attribute name='systemuserid' /> <attribute name='fullname' /> </link-entity> </link-entity> </link-entity> </link-entity> <filter type='and'> <condition attribute='name' operator='eq' value='prvCreateOpportunity' /> </filter> </entity> </fetch>
Team Query
<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'> <entity name='privilege'> <attribute name='name' /> <link-entity name='roleprivileges' from='privilegeid' to='privilegeid' alias='pt' link-type='inner' > <link-entity name='role' from='roleid' to='roleid' alias='rpt' link-type='inner' > <attribute name='name' /> <link-entity name='teamroles' from='roleid' to='roleid' alias='tr' link-type='inner' > <link-entity name='team' from='teamid' to='teamid' alias='trr' link-type='inner' > <attribute name='teamid' /> <attribute name='name' /> </link-entity> </link-entity> </link-entity> </link-entity> <filter type='and'> <condition attribute='name' operator='eq' value='prvCreateOpportunity' /> </filter> </entity> </fetch>
If you found the answer helpful, please mark as Verified
Join my network on LinkedIn Follow me on Twitter
Thank You & Best Regards
Francesco Picchi
Microsoft Dynamics CRM Consultant, Bologna+Milano, ITALY
Independent Contractor
You might be able to use AccessChecker from XRMToolbox.
You can enter the user and entity, and it will validate the privilege the user has.
This might help you better pinpoint the issue.
Hope this helps.
I dont think trace logs will capture it.
as you mentioned you tried everything- you might want to recreate the role start from the scratch.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156