Find out if account sid has administrator privileges

J

John Dumais

Hello,

I'm trying to figure out if I can find out if an account has administrator
privileges given just a sid I got from LookupAccountName. Normally, I would
just call LogonUser & grope through the returned token looking for group
sids that match the administrator alias, but my IT guys got all wrapped
around the axle when they saw I wanted to call LogonUser.

Thanks.
John Dumais
(e-mail address removed)
 
D

Drew Cooper [MSFT]

CheckTokenMembership. The Platform SDK entry for the API has sample code to
check for membership in the local administrators group.
 

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