active directory groups in .net core

lawrence whittemore asked on November 16, 2021 19:44

Just curious if anyone knows much about getting a users assigned AD groups. I was trying something like this but it is spitting out weird ids

var claimTypes = httpContextAccessor.HttpContext.User.FindAll(httpContextAccessor.HttpContext.User.Identities.First().RoleClaimType);

If it helps, my goal is to mimic what the admin (or older versions of kentico) does when a new user hits the site. to import them and their roles into the admin.

   Please, sign in to be able to submit a new answer.