class PrincipalInfo
Provides access to information about a principal.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/utilities/principal_info.py
6 - 46
moderate
Purpose
Provides access to information about a principal.
Source Code
class PrincipalInfo(ClientValue):
"""Provides access to information about a principal."""
def __init__(
self,
principal_id=None,
display_name=None,
email=None,
login_name=None,
department=None,
job_title=None,
principal_type=None,
):
"""
:param str principal_id: Specifies an identifier for the principal. It MUST be -1 if the principal
does not belong to the current site.
:param str display_name: Specifies the display name of the principal.
:param str email: Specifies the e-mail address of the principal.
:param str department: Specifies the department name of the principal.
:param str job_title: Specifies the job title of the principal.
:param str login_name: Specifies the login name of the principal.
:param int principal_type: Specifies the principal type.
"""
self.PrincipalId = principal_id
self.DisplayName = display_name
self.Email = email
self.LoginName = login_name
self.Department = department
self.JobTitle = job_title
self.PrincipalType = principal_type
@property
def entity_type_name(self):
return "SP.Utilities.PrincipalInfo"
@property
def principal_type_name(self):
return ODataType.resolve_enum_key(PrincipalType, self.PrincipalType)
def __str__(self):
return "{0}: {1}".format(self.principal_type_name, self.DisplayName)
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
bases: Parameter of type ClientValue
Return Value
Returns unspecified type
Class Interface
Methods
__init__(self, principal_id, display_name, email, login_name, department, job_title, principal_type)
Purpose: :param str principal_id: Specifies an identifier for the principal. It MUST be -1 if the principal does not belong to the current site. :param str display_name: Specifies the display name of the principal. :param str email: Specifies the e-mail address of the principal. :param str department: Specifies the department name of the principal. :param str job_title: Specifies the job title of the principal. :param str login_name: Specifies the login name of the principal. :param int principal_type: Specifies the principal type.
Parameters:
principal_id: Parameterdisplay_name: Parameteremail: Parameterlogin_name: Parameterdepartment: Parameterjob_title: Parameterprincipal_type: Parameter
Returns: None
entity_type_name(self)
property
Purpose: Performs entity type name
Returns: None
principal_type_name(self)
property
Purpose: Performs principal type name
Returns: None
__str__(self)
Purpose: Internal method: str
Returns: None
Required Imports
from office365.runtime.client_value import ClientValue
from office365.runtime.odata.type import ODataType
from office365.sharepoint.principal.type import PrincipalType
Usage Example
# Example usage:
# result = PrincipalInfo(bases)
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class Principal_v1 70.1% similar
-
class Principal 67.1% similar
-
class PickerEntityInformation 58.5% similar
-
class PrincipalType 58.5% similar
-
class PrincipalSource 58.1% similar