Isky,
You need to use IdentityReference.Translate to convert the
SecurityIdentifiers that WindowsIdentiy.Groups returns into NTAccounts
Something like:
Dim irc As IdentityReferenceCollection
Dim ir As IdentityReference
irc = WindowsIdentity.GetCurrent().Groups
For Each ir In irc
Dim account As IdentityReference =
ir.Translate(GetType(NTAccount))
Debug.WriteLine(account.Value)
Next
--
Hope this helps
Jay [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Isky" <is****@gmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
| Hello,
| i have the problem to convert the sid i get with the following code in
| the name of the group..
| I need to get for example "group_test" and not "S-1-5-32-544"
| The code i use is
| ---
| Dim irc As IdentityReferenceCollection
| Dim ir As IdentityReference
| irc = Principal.WindowsIdentity.GetCurrent.Groups
| For Each ir In irc
| Response.Write(ir.Value)
| Next
|
|
| ---
| thanks and sorry for my english :)
|