I am using UserProfilePropertiesForUser class to pull SharePoint profile properties of the user. However for some users, i am receiving user not found exception. I have just checked on the SharePoint site and can find the user even through check permissions.
Can someone please guide me what could be the possible root cause of this issue that i am getting user not found exception but the user can access the SPO site. I am also attaching the code and error screenshot for the reference.
var usr = context.Web.SiteUsers.GetByEmail("[email protected]");
cxt.Load(usr);
cxt.ExecuteQuery();
After the execute query call, i am getting the below exception.
Regards, Tayyab