Last post Aug 28, 2018 09:04 AM by Xing Zou
Aug 27, 2018 06:26 AM|sujilkumar|LINK
i Have a requirement like get the current user name and details of logged user using WInAD ,,, the same code or project should work the Inux platform also .Please let me know anyone have idea about it ..?
Aug 27, 2018 12:50 PM|damienBod|LINK
You could login using Azure AD with OIDC which handles the users in your AD when your enterprise is connected. The application could then use a Name claim, or given name claim or something else, which will work on both Windows and Linux.
Aug 27, 2018 02:27 PM|bruce (sqlwork.com)|LINK
if you don't have an azure adds account try:
Aug 27, 2018 03:27 PM|lextm|LINK
i Have a requirement like get the current user name and details of logged user using WInAD
That's already part of ASP.NET Core if you run behind IIS,
the same code or project should work the Inux platform also
That's impossible right now, as the relevant AD API is Windows only right now. It is possible for Microsoft or others to port them to Linux, but the efforts are huge, so you should not expect it soon. You can use other API such as LDAP but the code must
Aug 28, 2018 09:04 AM|Xing Zou|LINK
You could refer to a similar solution
here, is it what you need?
private readonly IHttpContextAccessor _httpContextAccessor;
public HomeController(IHttpContextAccessor httpContextAccessor)
_httpContextAccessor = httpContextAccessor;
string userName = _httpContextAccessor.HttpContext.User.Identity.Name;