c# - Programmatically Lookup a User in SharePoint -


I have encountered a situation where I should be able to see a user by their Active Directory name. I have tried to see the user in the SPS ite. User, sps ite. Aluusers and sps ite site user properties, but the user is not guaranteed to be in any of those lists. For users receiving site permissions through the Active Directory group that receives the site permissions for the site, there are no lists for users in different user lists, only a record for Active Directory group. What is the procedure to find a user programmatically in SharePoint directly without asking the active directory via LDAP?

I would ideally like to find a mechanism that works for both form based authentication and AD authentication, but I need

Try:

Determines whether the specified login name is from a legitimate user of the web site, and if the login name already exists If not, then it adds to the web site

This method works with both AD and A If you are using both of the FBA, you will need to have some user name prefix from a non-default provider like this:

  SPUser webUser = web.EnsureUser ("SecondaryProvider:" + UserName);  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -