Is there a way to get a person’s user id based on their email address?
This is not for the logged on user, so I can’t use _spPageContext.userId.
This is on a DFFS form. I’m using getFieldValue(“MyPersonField”) to get the email address. I’ve tried spjs.utility.userInfo(“person@company.com”), but that returns false.
Are you pulling the email address from a people picker field? – if so you can use this snippet:
var user = spjs.utility.getFieldValue({"fin": "Your_people_picker_field_internal_nam", "key": "loginname"});
var userInfo = spjs.utility.userInfo(user[0]);
var id = userInfo.ID;