Questions tagged [spuser]
Represents a user in Microsoft SharePoint Foundation.
104
questions
1
vote
0
answers
19
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
127
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
157
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 ...
3
votes
4
answers
9k
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
3k
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
70
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
247
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
9k
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
51
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
3k
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
962
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
167
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 ...
1
vote
0
answers
60
views
Questions on SPUser
I have a few questions related to the User object in SharePoint. When I use AD users, if I Disable a user in AD and run profile synchronization and get the SPUser instance for this user, I have no way ...
1
vote
0
answers
399
views
SPUser.Sid, SPUser.UserId.NameId are blank for some users
I have added some users in Active Directory and have imported them to SharePoint. After this, I wrote code to get their Sid. For users who have a blank Sid, I tried to get their UserId.NameId. I had ...
0
votes
1
answer
397
views
acces denied when trying to get web.siteusers
I write a powershell script and when i try to get siteusers from certain SPWeb not all i have an access denied.
My spweb object is correctly retrieve because i can display $web.Url
$webapps = Get-...
0
votes
2
answers
2k
views
SiteUsers.GetByEmail() returns user not found error
I have a custom webpart in which I get the SPUser object from email address, see the code below. It was working fine for like an year now , but since yesterday it gives a
"User cannot be found"
...
0
votes
2
answers
159
views
Creating Array "get_users" returns Array with Null or Undefined Value
I'm pulling user data, saving that to an array, and then using that array to pull in additional values from PeopleManager. The problem is (at least so far) my array has a blank value in it that I can'...
0
votes
2
answers
684
views
move-spuser fails because get-spuser wont verify account
The get-spuser giving me following error
get-spuser You must specify a valid user object or user identity.
What to do next? I added foreach but that's not helping
foreach ($sc in $webapp.sites)
{
...
0
votes
1
answer
4k
views
SPServices.SPGetCurrentUser does not work on subsite level?
I am using SPServices to get current user like this:
var user = $().SPServices.SPGetCurrentUser();
This works fine in the main site, but when I use the same line of code in subsite, I get:
...
2
votes
2
answers
766
views
Add user to SPGroup not working properly
I have wrote following code to add users to SharePoint group. It works fine and add user to the group first time. But if I remove the user from site manually and re run the app there is no exception ...
0
votes
1
answer
6k
views
Powershell EnsureUser: "The specified user could not be found."
I was trying to get a user with EnsureUser to make sure that if the user doesn't exists on the site collection, it is added right away.
Write-Host "LoginName" $usernameau #this prints mydomain/...
0
votes
1
answer
7k
views
Move-spuser doesn't replace user
In sharepoint 2013 i need to replace a user by an other.
For this i use:
Move-SPUser -Identity "DOMAIN\JaneDoe" -NewAlias "Domain\JaneSmith" -IgnoreSID
I give permission on a site to JaneDoe puting ...
2
votes
1
answer
4k
views
Convert user id to user name in a single rest query that gets list items
So I get some items from a list via a rest query, and in the Creator field I get an ID. I want to display the name of the user and not the ID. Calling the GetUserByID isn't an option because it might ...
1
vote
3
answers
3k
views
Issues with SPPrincipals on SP2013
I'm having some troubles with getting SPPrincipals, was hoping if anybody would point me to the right direction.
Here is the scoop:
I need to grant permissions to SPItem.
I get SPUser:
SPUser user =...
4
votes
2
answers
430
views
SPUser.Groups is empty
I have an SPUser object generated from the currently logged in user via SPContext.Current.Web.CurrentUser however user.Groups is coming back empty. I checked the group, the user is in the group. ...
1
vote
1
answer
5k
views
SPUser field is returning only ID in REST
I have my multi-value SPUser field in my list. When accessing it via REST, I am only able to retrieve the ID of the SPUsers. In the result of the REST, the SPUser field was also appended by an Id in ...
0
votes
1
answer
4k
views
Update User Value in List Item with Powershell
I have a column in a list that holds the Sharepoint ID of a user (as a string.) I have a script that takes that ID and grabs the SPUser object. I would like to update the value of another column as ...
0
votes
1
answer
286
views
Copy Person item value to another site
Which is the best way to copy item with person column to another site ? Situation: I have source site A and destination site B with the same structured custom list. I have to copy item from A to B. ...
0
votes
1
answer
833
views
Using EnsureUser with ADFS
I am trying to take some users and author them to list item posts. The SPWeb.EnsureUser() method works fine on a server only utilizing AD, but not one that is using ADFS.
Here is my attempt at ...
1
vote
0
answers
31
views
Issue regarding string representation of SPUser object in SharePoint 2013
I am facing an issue in SharePoint 2013 regarding string representation of SPUser object.
I am migrating my SharePoint site from SharePoint 2010 platform to SharePoint 2013 platform. I have a code, ...
0
votes
1
answer
322
views
Compare two SPUser variable
I validate two SPUser values inside if condition.
Both SPUser variables have values when my program runs, but when both SPUser values are same my app runs and enter inside if condition. Ideally it ...
4
votes
2
answers
948
views
Convert this display name to SPUser
How to convert this display name to SPUser type.
My input is Sivakumar, Piratheban (ext)(domain\user)
0
votes
1
answer
1k
views
how to remove user from sharepoint Farm
I want to remove a user from SharePoint from all Web applications in SharePoint Farm. Like the user has never existed! is ti possible?
I see there many users that don't exists in AD anymore. But I ...
0
votes
1
answer
151
views
No Email in SPUser Object on Site Collection Level?
I am facing the issue that I do not have a value for email in SPUser object on Site Collection level but in Subsites.
I tried web.EnsureUser as well, which loads the user correctly (-1# issue) but ...
0
votes
3
answers
2k
views
How to Get all SharePoint SpUsers from SpFarm with C#
How to get a list of all users in a certain Farm in SharePoint by code?
Is there any away to do that without must iterate every SPgroup in every SPWeb in every WEApp?
1
vote
1
answer
2k
views
Get SPUser by passing Email address
i have an Email address of particular user. Now i want the SP username of that particular email address programatically.
Thanks.
1
vote
1
answer
43
views
Adding users to a Form-based authentication site
I'm using SharePoint Foundation 2013. I have created an Extranet where Active Directory and Form based users could log in (multi mode). I need to add users to this site via a windows service. My ...
1
vote
2
answers
305
views
Bind all users of office 365 except system users using C#
How to bind all the users of Sharepoint(office 365) except system users like :
"System Account",
"NT AUTHORITY\authenticated users",
"_SPOCacheFull",
"YLO001_spocrwl_142_11094".
I want only ...
0
votes
2
answers
1k
views
How to give different permission programmatically on Document Library for different group users?
I have document library & 3 groups(AdminGroup,Reviewer,Distributor). I have already give a permission on groups, AdminGroup has Full Control, Reviewer has Reader & Distributor has None :
...
2
votes
2
answers
8k
views
How to remove user from Sharepoint Group using JavaScript?
I want to add and remove user to/from Office 365 Group.
I tried using C# code but got error : "User does not exist or is not unique".
After searching on the web I can't find solution.So i tried ...
1
vote
1
answer
4k
views
Remove user from SPFieldUserValueCollection
I have a "person or group" type column in my calendar list as "Participants".
I need to add and remove users from this column. Adding users works fine.
When trying to remove a user it does not get ...
0
votes
0
answers
549
views
Set-SPUser - not valid user object - 19;#username - powershell
I'm trying to add users to a custom "responsible" group that have the same permissions as owners group.
I'm getting member from a list in SP (people and group).
$Responsible = ...
0
votes
1
answer
176
views
Sharepoint 2013 c# customise field data depending on user connected properties
I have some specific need here, and i don't know how to approach it. I explain :
I have a SharePoint list to which i am adding a field in feature activated event reciever.
I am adding a 3 choices ...
1
vote
1
answer
843
views
Display SPUser Information on an application page
I have an application page (SP2010) where I have a SPUser object (the current user), now I would like to display this SPUser as an Hyperlink on the apsx, linked to his UserProfilePage (userdisp.aspx) ...
0
votes
1
answer
4k
views
Get SPUser information
I am trying to get a user's information off of SharePoint. I can see the user's information through the UI when I click their name. I can add them to groups and sites freely. But no matter what I ...
0
votes
2
answers
941
views
How to get from DirectoryEntry to SPuser
I need to get the SPuser for a partcular directory entry.
What I need to do is get all the users from an AD group and give them permissions to a list item. The code is:
SearchResult result = ...
8
votes
5
answers
26k
views
How do I get SPUser Object?
I'm unable to get SPUsers/user.
As an example I have here a User (Approver):
<User ID=\"31\" Sid=\"\" Name=\"Approver\" LoginName=\"i:0#.w|domain\\approver\"
Email=\"approver@domain.se\" Notes=\"...
1
vote
2
answers
3k
views
Unable to get user field value in event receiver's afterproperties
I have a document library in which there is one field approver (multi - value). There is an event receiver for item updating of the document library that I want to validate user while changing the ...