Questions tagged [spprincipal]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
3 votes
2 answers
13k views

Determine if SPPrincipal is SPUser, SPGroup or AD User

Context I have a List<SPPrincipal> that is a mix of SPGroup, SPUser and AD Users. Problem I'm trying to find out how to determine if an SPPrincipal I have is an SPUser, SPGroup or an AD user....
user avatar
2 votes
1 answer
450 views

How do I get Active Directory Group Name from Sharepoint programmatically?

So my problem is this: I have created a Sharepoint Group and added a New User, which in fact is an Active Directory Group. Now I loggin using an account from this Active Directory Group. I need this ...
MIlena's user avatar
  • 487
2 votes
2 answers
856 views

Is possible to rename a SPUser(IsDomainGroup) LoginName?

I want to rename SPPrincipals that are ADGroups. I've tried with $SPFarm = Get-SPFarm #$SPFarm.MigrateGroup("loginName", "newLoginName") $SPFarm.MigrateUserAccount("loginName", "newLoginName", $...
fallout's user avatar
  • 1,015
2 votes
1 answer
450 views

Is it possible to update/set SPGroup IsHiddenInUI?

On SPGroup there is a property called IsHiddenInUI - a value that indicates whether this member should be hidden in the UI. However you can't set that (it is a get only). I'm creating some groups I ...
mhbuur's user avatar
  • 549
2 votes
1 answer
2k views

ResolvePrincipal returns SPPrincipalInfo with PrincipalId == -1

When/why does SPUtility.ResolvePrincipal return a non-null SPPrincipalInfo with a PrincipalId of -1 ? I can manually assign rights to the user through the web interface. The user resides in an active ...
Chris's user avatar
  • 21
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 =...
Victor Shostak's user avatar
1 vote
1 answer
98 views

What is the purpose of the Notes parameter in the SPRoleAssignment constructor?

There are two constructors for the SPRoleAssignment class: public SPRoleAssignment(SPPrincipal principal) public SPRoleAssignment(string LoginName, string Email, string Name, string Notes) The ...
Abbas's user avatar
  • 159
1 vote
0 answers
879 views

Domain user returns false when I validate user using PrincipalContext ValidateCredentials

I have created a function to check domain user is valid or not and I have deployed this function to service.asmx in _layouts folder public bool CheckUser(string username, string password, string ...
adilahmed's user avatar
  • 2,955
1 vote
0 answers
1k views

How to load Group.Owner properties using CSOM

When I try to load owner = TargetSite.Web.EnsureUser(grp.Owner.LoginName); I got the exception : The property or field has not been initialized. It has not been requested or the request ...
hello B's user avatar
  • 681
1 vote
0 answers
93 views

People Service ResolvePrincipals does not resolve SharePoint groups when the PrincipalType is All and SharePoint is using claims based authentication

I'm updating some legacy code which relies on the People service. SharePoint groups do not resolve on a webapplication in SP2013 with the authentication provider set to Claims Based Authentication ...
Will Hobday's user avatar
0 votes
2 answers
3k views

SPFieldUserValue and SPPrincipal

I have a complex application that have several field of type UserMulti. These fields can accept either SPUser or SPGroup or a combination of both kind. I have in my code the ID and the name of a ...
Steve B's user avatar
  • 7,488
0 votes
1 answer
60 views

How to clear items from Get-PnPTenantServicePrincipalPermissionRequests command?

I was learning how to use the service principal PowerShell PnP commands and everything was fine until I reached Get-PnPTenantServicePrincipalPermissionRequests. I understand how to grant and revoke ...
jaloplo's user avatar
  • 789