Questions tagged [spuser]
Represents a user in Microsoft SharePoint Foundation.
105 questions
0 votes
1 answer
33 views
How to change SPUser to SPFieldUserValue in ItemAdding event receiver
There is a field in my list called Authority Name and its type is Person. I am writing ItemAdding event receiver where I want to change this fields value. For e.g. if user is adding Mike in this field ...
1 vote
0 answers
33 views
User Profile Personal Fields Privacy - Where/Which field is that info stored?
How is stored personal fields (for example birthday) visibility (Everyone/Only Me) per user profile in SPO/O365? OnPrem is something like DefaultPrivacy and UserOverridePrivacy but on SPO I can't find ...
1 vote
1 answer
277 views
get creation Date of spuser
I need to get all the users that are added to spgroup "XX" on specific date . $url = "https://spsite.com $User = Get-SPUser -web $url -Group "XX" $User | Select Userlogin,Groups,DisplayName,Email,...
0 votes
0 answers
226 views
web.EnsureUser(encUserName) throwing Exception - User Not Found
I found this link for reference but I am not getting the solution that I want. I have created a custom web part and in that, I have written web.EnsureUser(userloginname); It works perfectly for ...
7 votes
4 answers
13k views
EnsureUser() will return the following error "The specified user could not be found. "
I am working on developing a server side event receiver inside sharepoint on-premises farm 2013. Inside the code i have the following, which will retrieve a string from a drop down list column ...
0 votes
1 answer
4k views
'Get-SPUser –Web | Set-SPUser –SyncFromAD' return an error "Cannot get the full name or e-mail address of user" on leaver users
I have an Enterprise Wiki site collection inside my sharepoint on-premises farm 2013. now the site have been for around 4 years, and as we did not configure the User Profile service. so many of the ...
0 votes
1 answer
79 views
What is the best Object type i can use that represent a site column of type People or Group, which can hold SPUser or SPGroup
I am working on an Event Receiver for my SharePoint farm 2013. now i have a site column of type "People or Group", and this site column can hold User Name/s OR group names. so inside my Event ...
3 votes
0 answers
293 views
Reliable way to get user domain from SPUser
I feel a bit silly that I can't think of a reliable way to get this information. Most SPUsers, but not all, now have claims LoginNames. This makes parsing the domain name a little bit tricky. Is ...
0 votes
1 answer
13k views
Where will EnsureUser() method add users, and how it is going to validate users
I was searching for a method which returns SPUser object based on the display name of the user, and I found the EnsureUser() method. as I want to use this method inside my SharePoint server 2013 event ...
0 votes
2 answers
64 views
unable to pass spuser as paramter into CAML query
I want to pass the spuser as a paramter to the caml query but when i tried the below code its throwing error: using (SPWeb spWeb = spSite.OpenWeb()) { ...
3 votes
2 answers
4k views
Get all groups for a specific web site (NOT SITE COLLECTION) using powershell?
I would like to know how to get all groups of a specific web site using powershell. I do know that all groups are defined at the site collection level but when browsing in a specific web, it only ...
1 vote
1 answer
1k views
Can we use distribution lists inside sharepoint 2016 "Person and Group" column type
I have created a new site column of type "Person and group" inside my team site collection inside sharepoint 2016. I configure it to retrieve users and groups from active directory, as ...
1 vote
1 answer
1k views
How to display SPUser with presence indicator and contact card in custom webpart
I am trying to find a way to display two columns from a list item, values in the both the columns are of type SPFieldUser. Looking for a way to display their contact card just like the way it is ...
1 vote
1 answer
195 views
SPFieldUserValue.User.Email giving an deleted email address on prod
Am very new to SharePoint. I have got stuck into a strange issue. On Prod server SPFieldUserValue.User.Email giving an email address which as been deleted. Actually, there were 2 users with the same ...
1 vote
3 answers
2k views
Sharepoint Online JavaScript convert from SPUser to SPFieldUser and get name
How can I get full name from SPUser? I got him from get_currentUser() from web context. And how can I convert from SPUser to SPFieldUser in JS? EDIT: I need it to compare, I get from list field ...