Find current users active directory group C++
How would I go about querying what active directory group the currently logged in user belongs to? I am assuming it will be through LDAP but I havnt been able to find much on how to get this particular information. I have put together some code but im not quite sure what I need to do next // Open the access token associated with the calling process. if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken) == FALSE) { dwErrorCode = GetLastError(); wprintf(L"OpenProcessToken failed. GetLastError returned: %d\n", dwErrorCode); return HRESULT_FROM_WIN32(dwErrorCode); } // Retrieve the token