Represents a user in Microsoft SharePoint Foundation.

learn more… | top users | synonyms

0
votes
1answer
45 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" error. ...
0
votes
2answers
19 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
2answers
49 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
1answer
47 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: ...
0
votes
0answers
27 views

Get Multi user value from another list in infopath

Could anybody please help me to resolve this issue? I've designed an InfoPath form, with some controls. I have a second list which has the values like this If the current user trying to see a saved ...
0
votes
1answer
36 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
0answers
24 views

ADD user to group : Acces Denied in runwithElevated (UserAccountDirectoryPath restriction)

Hello I have a problem for adding users to a group in SharePoint 2010 I have a restriction of Users OU path (Active Directory) with the SPSite.UserAccountDirectoryPath on my SPSite. Programmatically ...
0
votes
0answers
260 views

The specified user could not be found." with EnsureUser with Powershell

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
1answer
102 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 ...
2
votes
1answer
43 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 ...
0
votes
3answers
104 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 =...
3
votes
2answers
49 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
1answer
375 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
1answer
313 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
1answer
93 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
1answer
157 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
0answers
15 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
1answer
41 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
2answers
170 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
1answer
256 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
1answer
31 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
2answers
678 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
1answer
425 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
1answer
27 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
2answers
180 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
2answers
192 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
2answers
2k 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 ...
0
votes
1answer
1k 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
0answers
268 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
1answer
141 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
1answer
381 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
1answer
2k 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
2answers
303 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 = ...
2
votes
5answers
9k 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
1answer
2k 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 ...
2
votes
4answers
2k views

How to know SPUser.LoginName is System Account?

I am trying get the Modified By column value. And I want to check my PeoplePicker control contains the value same as the Modified By column value. I am stuck in the problem that Modified By column'...
1
vote
1answer
752 views

Check user read access to a particular list item

I need to check if a user has read level access to a particular list Item. What would be the best approach 1) listItem.DoesUserHavePermissions(currentUser, SPBasePermissions.ViewListItems); //here ...
1
vote
1answer
2k views

SPFieldUserValue User is null

I have a list in which I can also view the version of each item. Suppose I have an item ItemX which has been modified by UserX, I then delete UserX and try to view the version item of ItemX which had ...
2
votes
1answer
564 views

Force create SPUser for disabled AD account

I am trying to get SharePoint to create an SPUser for a disabled active directory account. The reason for this is that I am archiving items across site collections. As the items are copied I am ...
1
vote
1answer
198 views

Save conflict error when handling user deletion from group programmatically

I have a site in which unique permission group are there. I want to update the list item as per the changes made in the user group in site, i.e. if user is removed from the site user group then the ...
0
votes
3answers
4k views

Unable to cast object of type 'System.String' to type 'Microsoft.SharePoint.SPFieldUserValue'

I want to get the user value from the Person or Group column in code behind. My code is: List<string> manager = GeneralMethods.GetUsers((SPFieldUserValueCollection)item[FieldNames.Manager]); ...
0
votes
2answers
370 views

SPUser have logon into Site Collection?

Possible to loop through all Site Collection Users and check if they have ever logon into the Site Collection and when? db table dbo.UserInfo tokens info can be useful? this script can retrieve the ...
1
vote
2answers
789 views

spfielduservaluecollection.remove not working

I want to remove the user from the list item from the column of type person or group and it is multi-valued. My code is: private void DeleteUserFromList(SPUser userDeleted, string fieldName,...
0
votes
0answers
283 views

Getting a SPUser's title (as it is on Active Directory)

I need to get the Titles (eg: Mr, Mrs, Dr) for SPUsers which are stored in a list. The Title is not available on the SPUser object, is it possible to somehow get this information, assuming it is ...
3
votes
4answers
12k views

How to know the exact loginname of the user who operates as system account?

If current logged user operates as "System Account", SPContext.Current.Web.CurrentUser.LoginName will return "sharepoint\system", so I want to know the exact loginname of the user. Here is what I ...
1
vote
0answers
308 views

Get manager of current user in workflow

how can I get the current user's manager's phone information. I select the current user id like this: public Guid workflowId = default(System.Guid); public SPWorkflowActivationProperties ...
2
votes
2answers
572 views

Get all SPUser groups?

I have a SPUser and I want to get all the user groups in which the SPUser exists. How can i get all the SPGroups containing the SPUser programatically?. Sample codes and useful links would be very ...
2
votes
5answers
9k views

Error in Web.EnsureUser(user) :- User Not Found

Hey Friends I am trying to develop a web part in that I am fetching the user name. But doing this I am getting the error that User cannot be found. But the main thing is that in the line where I ...
1
vote
1answer
555 views

How to set a UserMulti field via a UserField Control?

I have a list similar to the usual Tasks Sharepoint List and I introduced the field assigned to as a multi user field like this (I have read somewhere that with Mult option should always be set to ...
1
vote
2answers
2k views

Getting SPUser Last login date / time

Is there a way to get the last login time from an SPUser object? I don't want the last login time to Active Directory, but specifically for the sharepoint site.