Thanks, very interesting but it does not solve my problem.
I need My.user.isinrole("MycustomGroup") to return true if a My.user is in
the group MyCustomGroup on my domain controller.
It does not work.
I can see that my.User is in the correct domain and my.user is a member of
administrators
If I use
If My.User.IsInRole(ApplicationServices.BuiltInRole.A dministrator)
or use
If My.User.IsInRole("Administrators")
It returns true which Is Ok, The user is part of the administrators group
The two above use builtin groups. I can get the correct result on any
built-in group on the domain. But when I add a new group to the domain eg
MyCustomGroup, then write
If My.User.IsInRole("MycustomGroup") it returns false
It looks like the IsinRole function only works with built-in roles.
Bob
""Peter Huang" [MSFT]" <v-******@online.microsoft.com> wrote in message
news:Z1**************@TK2MSFTNGXA02.phx.gbl...
Hi
I am not familar with AD.
But here is a link about a script which will list all the group certian
user belongs to.
You may try to run the script to see the MyCustomRole is in the list.
List User Group
http://www.rlmueller.net/List%20User%20Groups.htm
For detailed information about AD, I think you may try to post in the
newsgroup below.
microsoft.public.adsi.general
or
microsoft.public.win2000.active_directory
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no
rights.