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.
Articles Tagged: Security Role
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.