Get UserInfo using windows network login
Posted: Wed Jan 08, 2020 1:23 pm
Hi -
I have a process that needs to get information about a SoftPro user. I have their networkLogin (i.e. DOMAIN\UserName) - I wrote this code but the user object is always returned as NULL.
Any advice?
ISecurityManager sm = selectServer.GetService<ISecurityManager>();
//Get your current user
ISecurityUser userInfo= sm.GetUser(AuthenticationScheme.Windows, "DomainName\Jane.Doe");
if (userInfo!= null)
{
return userInfo.EmailAddress;
}
else
{
return "";
}
I have a process that needs to get information about a SoftPro user. I have their networkLogin (i.e. DOMAIN\UserName) - I wrote this code but the user object is always returned as NULL.
Any advice?
ISecurityManager sm = selectServer.GetService<ISecurityManager>();
//Get your current user
ISecurityUser userInfo= sm.GetUser(AuthenticationScheme.Windows, "DomainName\Jane.Doe");
if (userInfo!= null)
{
return userInfo.EmailAddress;
}
else
{
return "";
}