Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

How to avoid "User not found" error using EnsureUser()

$
0
0

Hi,

I am trying to get SPUser object using EnsureUser() method by passing logon (domain\username).

The problem is when a particular user account is disabled in AD, it gives the above exception. 

I need to know if there is some way to know prior OR if any other way to avoid this and also get the SPUser? 

Thanks.


Regards, Nayan


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>