From time to time, you may want to impersonate a user in the system. See what he sees, see how his Security Roles affect the system and/or recreate a security role related error. Unfortunately, there is no supported Microsoft way of doing that, so you have to resort to 3rd party solutions. You can for […]
Articles Tagged: Security Role
Find and enumerate all Security Roles for a given Team
Sample code to find all Security Roles for a Team: Observe: The above code requires a generated XRM early bound entity file for the Role and TeamRoles entities.
Find and enumerate all Security Roles for a given System User
Sample code to find all Security Roles for a System User: Observe: The above code requires a generated XRM early bound entity file for the Role and SystemUserRole entities.
Programmatically add a Security Role to all System Users regardless of Business Unit
Sample code to add an existing Security role to all System Users: Observe: The above code requires a generated XRM early bound entity file for the Role and SystemUser entities.