我能够获得与经过身份验证的用户关联的角色,但不能获得与组关联的角色。有没有办法获取群组
WindowsIdentity userIdentity = HttpContext.Current.User.Identity as WindowsIdentity;
AzAuthorizationStoreClass azManStore = new AzAuthorizationStoreClass();
string storeConnectionString = ConfigurationManager.ConnectionStrings["<CONN STRING>"].ConnectionString;
azManStore.Initialize(0, storeConnectionString, null);
IAzApplication azApp = azManStore.OpenApplication("<APP NAME>", null);
ulong token = (ulong)userIdentity.Token;
IAzClientContext ctx = azApp.InitializeClientContextFromToken(token, null);
object roles = ctx.GetRoles(String.Empty);