Represents a user in Microsoft SharePoint Foundation.

learn more… | top users | synonyms

1
vote
0answers
302 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 ...
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 ...
0
votes
4answers
3k views

How to check if the current user is equal to some spuser?

I am using sp2010. I get the current user from the context. And I would like to check if it is equal to the creator of an list item. But the code says it is not equal. Why? Is there some other ...
0
votes
2answers
4k views

Error using SPContext.Current.Web.AllUsers in Visual Studio workflow

I have the following code running in a Visual Studio workflow. I am trying to specify the user who is adding list items in the code because I guess the system account (default for VS) will not allow ...
0
votes
1answer
783 views

How to create a SPUser object from its XML representation

I have the following XML representation for a user: <pc:Person xmlns:pc="http://schemas.microsoft.com/office/infopath/2007/PartnerControls"> <pc:DisplayName>John ...
0
votes
1answer
31 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
3answers
75 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 ...
0
votes
1answer
37 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 ...
0
votes
1answer
137 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 ...
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
1answer
7k views

Add users to SP Group

I am using following PS script to add users from a text file. Some of the users in the text file are inactive or gone (basically can't be resolved). The error message from the catch block is executed ...
0
votes
1answer
29 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
1answer
56 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 ...
0
votes
2answers
610 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?
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
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
353 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 ...
0
votes
1answer
973 views

Find SPUser Preferred Name from UserPrincipal

I am looping through a group of UserPrincipal that was retrieved from Active Directory. I need to get find a SPUser using the properties of the UserPrincipal. Once the SPUser is found I will get its ...
0
votes
1answer
243 views

How can I return user-values as a SPUser (Hyperlink) in a visual webpart in C#?

I'm developing a visual webpart (TreeView). If I click on a node (folder), it gives me the credentials of the folder. Now, the values are all appearing in a label. How can I return the users and ...
0
votes
2answers
729 views

How to grant permission to use specific Application Page in SharePoint

I have custom application page, now what I want to do, is to allow users ( or SPGroup ) to view and use application page. How this should be done ? Currently only administrator can view application ...
0
votes
0answers
20 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
0answers
23 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
139 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 ...
0
votes
1answer
249 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
83 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
139 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 ...
0
votes
1answer
211 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
29 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
173 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 : ...
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
2answers
263 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 = ...
0
votes
0answers
277 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 ...
0
votes
2answers
3k views

How to get extra User properties?

A few custom properties have been added to the user object via CA. I would I retrieve these fields programmatically? Solution: UserProfileManager mgr = new ...
0
votes
4answers
5k views

How do I restrict access to a particular page in SharePoint?

I want two pages from my site to be restricted from viewers until its contents are thoroughly checked by my team. How do I accomplish this? Thank you very much!
0
votes
2answers
1k views

Inherit field editor control from SPUserField

I need to implement AutoComplete feature for People Editor in custom field type derived from SPUserField. To do this, I have to customize both render template and field editor control (and other ...
-2
votes
2answers
1k views

Ensure User from multiple domain for user that has never access to sharepoint

This is my situation. I have a farm in which an instance of Sharepoint Foundation is installed.. Windows Server is configure to accept users from 3 trusted domain (xxx, yyy and zzz) Suppose i have ...