How to find out if an account represents a user or a group

B

Birger Niss

Hi,

I am using File.GetAccessRules to find the NT-users and groups that have
permissions on the object. I need however to find out if a given rule
pertains to a user or a group. How can I do that?

With rule.IdentityReference I can get the underlying NTAccount object,
which - via the Translate method - can be translated to a SID security
identifier.
Very often the SID is short for groups and long for users, but not always.

Any help will be greatly appreciated!

Birger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top