CRM 2013 Programmatically Comparing Security Roles

This code will print out all the differences between two given security roles. Useful when you need to sanity check your work or debug security issues.

Differences between Marketing Manager and Marketing Professional
Marketing Manager has prvActivateBusinessProcessFlow: Global
Marketing Manager has prvActivateSynchronousWorkflow: Global
Marketing Manager has prvAppendCompetitor: Global

Marketing Professional has prvActivateSynchronousWorkflow: User
Marketing Professional has prvAppendEmailTemplate: Bu

Continue reading

Advertisements

CRM 2013 Programmatically Comparing User Privileges

When debugging security issues it can be useful to compare the privileges of a functioning user with a non-functioning user.

The code in this post will print out all the privilege differences between two given users.

Differences between user1@gap.com and user2@gap.com
user1@gap.com has BU:root, PRIV:prvCreateAccount, DEPTH:Global
user1@gap.com has BU:root, PRIV:prvCreateActivity, DEPTH:Global
user1@gap.com has BU:root, PRIV:prvCreateArticle, DEPTH:Global

user2@gap.com has BU:sub, PRIV:prvCreateActivity, DEPTH:Deep
user2@gap.com has BU:sub, PRIV:prvCreateArticle, DEPTH:Global

Continue reading