At first I thought the code below works because if I have the group as \"IT\" it functions correctly because my username is in the IT group in active directory. What I learn
You cannot do it by this way.
You should query the active directory.
You can use a wrapper for AD. Check out http://www.codeproject.com/Articles/10301/Wrapper-API-for-using-Microsoft-Active-Directory-S