Interface IUserProfile
- Namespace
- PnP.Core.Model.SharePoint
- Assembly
- PnP.Core.dll
An entry point for the user profile APIs
public interface IUserProfile : IDataModel<IUserProfile>, IDataModelParent, IDataModelWithContext, ISupportModules<IUserProfile>, IDataModelGet<IUserProfile>, IDataModelLoad<IUserProfile>
- Inherited Members
- Extension Methods
Properties
EditProfileLink
The link to edit the current user's profile
string EditProfileLink { get; }
Property Value
IsMyPeopleListPublic
A Boolean value that indicates whether the current user's People I'm Following list is public.
bool IsMyPeopleListPublic { get; }
Property Value
Methods
GetMyProperties(params Expression<Func<IPersonProperties, object>>[])
Gets user properties for the current user.
IPersonProperties GetMyProperties(params Expression<Func<IPersonProperties, object>>[] selectors)
Parameters
selectorsExpression<Func<IPersonProperties, object>>[]Specific properties to return
Returns
- IPersonProperties
An instance of IPersonProperties
GetMyPropertiesAsync(params Expression<Func<IPersonProperties, object>>[])
Gets user properties for the current user.
Task<IPersonProperties> GetMyPropertiesAsync(params Expression<Func<IPersonProperties, object>>[] selectors)
Parameters
selectorsExpression<Func<IPersonProperties, object>>[]Specific properties to return
Returns
- Task<IPersonProperties>
An instance of IPersonProperties
GetPropertiesFor(string, params Expression<Func<IPersonProperties, object>>[])
Gets user properties for the specified user.
IPersonProperties GetPropertiesFor(string accountName, params Expression<Func<IPersonProperties, object>>[] selectors)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
selectorsExpression<Func<IPersonProperties, object>>[]Specific properties to return
Returns
- IPersonProperties
An instance of IPersonProperties
GetPropertiesForAsync(string, params Expression<Func<IPersonProperties, object>>[])
Gets user properties for the specified user.
Task<IPersonProperties> GetPropertiesForAsync(string accountName, params Expression<Func<IPersonProperties, object>>[] selectors)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
selectorsExpression<Func<IPersonProperties, object>>[]Specific properties to return
Returns
- Task<IPersonProperties>
An instance of IPersonProperties
GetPropertyFor(string, string)
Gets the specified user profile property for the specified user.
string GetPropertyFor(string accountName, string propertyName)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
propertyNamestringThe case-sensitive name of the property to get.
Returns
- string
The specified profile property for the specified user.
GetPropertyForAsync(string, string)
Gets the specified user profile property for the specified user.
Task<string> GetPropertyForAsync(string accountName, string propertyName)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
propertyNamestringThe case-sensitive name of the property to get.
Returns
GetUserOneDriveQuotaMax(string)
Gets the user's onedrive max quota
long GetUserOneDriveQuotaMax(string accountName)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
Returns
- long
The max quota value
GetUserOneDriveQuotaMaxAsync(string)
Gets the user's onedrive max quota
Task<long> GetUserOneDriveQuotaMaxAsync(string accountName)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
Returns
ResetUserOneDriveQuotaToDefault(string)
Resets the user's onedrive quota to the default value
string ResetUserOneDriveQuotaToDefault(string accountName)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
Returns
- string
The string outcome
ResetUserOneDriveQuotaToDefaultAsync(string)
Resets the user's onedrive quota to the default value
Task<string> ResetUserOneDriveQuotaToDefaultAsync(string accountName)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
Returns
SetMultiValuedProfileProperty(string, string, IList<string>)
Sets the user's multi value profile property.
void SetMultiValuedProfileProperty(string accountName, string propertyName, IList<string> propertyValues)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
propertyNamestringThe case-sensitive name of the property to get.
propertyValuesIList<string>The property values
SetMultiValuedProfilePropertyAsync(string, string, IList<string>)
Sets the user's multi value profile property.
Task SetMultiValuedProfilePropertyAsync(string accountName, string propertyName, IList<string> propertyValues)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
propertyNamestringThe case-sensitive name of the property to get.
propertyValuesIList<string>The property values
Returns
SetMyProfilePicture(byte[])
Uploads and sets the user profile picture. Users can upload a picture to their own profile only.
void SetMyProfilePicture(byte[] fileBytes)
Parameters
fileBytesbyte[]A byte array representing the file
SetMyProfilePictureAsync(byte[])
Uploads and sets the user profile picture. Users can upload a picture to their own profile only.
Task SetMyProfilePictureAsync(byte[] fileBytes)
Parameters
fileBytesbyte[]A byte array representing the file
Returns
SetSingleValueProfileProperty(string, string, string)
Sets the user's profile property.
void SetSingleValueProfileProperty(string accountName, string propertyName, string propertyValue)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
propertyNamestringThe case-sensitive name of the property to get.
propertyValuestringThe property value
SetSingleValueProfilePropertyAsync(string, string, string)
Sets the user's profile property.
Task SetSingleValueProfilePropertyAsync(string accountName, string propertyName, string propertyValue)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
propertyNamestringThe case-sensitive name of the property to get.
propertyValuestringThe property value
Returns
SetUserOneDriveQuota(string, long, long)
Sets the user's onedrive quota
string SetUserOneDriveQuota(string accountName, long newQuota, long newQuotaWarning)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
newQuotalongNew quota value
newQuotaWarninglongQuota warning value
Returns
- string
The string outcome
SetUserOneDriveQuotaAsync(string, long, long)
Sets the user's onedrive quota
Task<string> SetUserOneDriveQuotaAsync(string accountName, long newQuota, long newQuotaWarning)
Parameters
accountNamestringThe account name, i.e. "i:0#.f|membership|admin@m365x790252.onmicrosoft.com"
newQuotalongNew quota value
newQuotaWarninglongQuota warning value