Posted in December 2010

How to: Grouping groups

Today I would like to show a tip for grouping active directory groups using LINQ to objects. Suppose this scenario: You wanna retrieve all the roles a user belongs, grouping them by their domain name, as shows: Groups under: – Group name: All – Group name: LOCAL Groups under: BUILTIN – Group name: Users – … Continue reading

How to: Check if current user is member of ‘domain admins’

How to: Check if current user is member of ‘domain admins’

The scenario Sometimes in business applications it’s interesting checking if current user is member of the ‘domain administrators’ role. For example I am used to checking if current user has administrative privileges in order to showing some advanced configuration options (changing the application’s connection string, or allow creating new users). IsInRole To acomplish this we … Continue reading