Table of Contents

Interface ISharePointUser

Namespace
PnP.Core.Model.Security
Assembly
PnP.Core.dll

Public interface to define a SharePoint User

public interface ISharePointUser : IDataModel<ISharePointUser>, IDataModelParent, IDataModelWithContext, ISupportModules<ISharePointUser>, IDataModelGet<ISharePointUser>, IDataModelLoad<ISharePointUser>, IDataModelDelete, ISharePointPrincipal, IQueryableDataModel
Inherited Members
Extension Methods

Properties

AadObjectId

Id of the underlying graph object (if any)

string AadObjectId { get; set; }

Property Value

string

All

A special property used to add an asterisk to a $select statement

object All { get; }

Property Value

object

Department

Department of the user

string Department { get; set; }

Property Value

string

Expiration

A date/time string for which the format conforms to the ISO8601 time format YYYY-MM-DDTHH:MM:SSZ and which represents the time and date of expiry for the user. A null value indicates no expiry.

string Expiration { get; }

Property Value

string

Groups

Returns the collection of ISharePointGroup for this user

ISharePointGroupCollection Groups { get; }

Property Value

ISharePointGroupCollection

IsEmailAuthenticationGuestUser

Indicates whether the user is a guest user authenticated via an e-mail address

bool IsEmailAuthenticationGuestUser { get; }

Property Value

bool

IsShareByEmailGuestUser

Indicates whether the user is a guest user shared by e-mail

bool IsShareByEmailGuestUser { get; }

Property Value

bool

IsSiteAdmin

Indicates whether the user is a site collection administrator

bool IsSiteAdmin { get; }

Property Value

bool

Mail

E-mail address of the user. SP REST property name: Email

string Mail { get; set; }

Property Value

string

UserPrincipalName

User principle name (UPN) of the user

string UserPrincipalName { get; set; }

Property Value

string

Methods

AddRoleDefinitions(params string[])

Adds role definitions for this user

bool AddRoleDefinitions(params string[] names)

Parameters

names string[]

Returns

bool

AddRoleDefinitionsAsync(params string[])

Adds role definitions for this user

Task<bool> AddRoleDefinitionsAsync(params string[] names)

Parameters

names string[]

Returns

Task<bool>

AsGraphUser()

Returns this SharePoint user as a Graph user

IGraphUser AsGraphUser()

Returns

IGraphUser

AsGraphUserAsync()

Returns this SharePoint user as a Graph user

Task<IGraphUser> AsGraphUserAsync()

Returns

Task<IGraphUser>

GetRoleDefinitions()

Retrieves the role definitions for this user

IRoleDefinitionCollection GetRoleDefinitions()

Returns

IRoleDefinitionCollection

GetRoleDefinitionsAsync()

Retrieves the role definitions for this user

Task<IRoleDefinitionCollection> GetRoleDefinitionsAsync()

Returns

Task<IRoleDefinitionCollection>

RemoveRoleDefinitions(params string[])

Removes role definitions for this user

bool RemoveRoleDefinitions(params string[] names)

Parameters

names string[]

Returns

bool

RemoveRoleDefinitionsAsync(params string[])

Removes role definitions for this user

Task<bool> RemoveRoleDefinitionsAsync(params string[] names)

Parameters

names string[]

Returns

Task<bool>