🔍 Code Extractor

class Principal_v1

Maturity: 33

Principal class is a representation of an identity (user/group).

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/sharing/principal.py
Lines:
4 - 42
Complexity:
moderate

Purpose

Principal class is a representation of an identity (user/group).

Source Code

class Principal(ClientValue):
    """Principal class is a representation of an identity (user/group)."""

    def __init__(
        self,
        id_=None,
        directory_object_id=None,
        email=None,
        expiration=None,
        is_active=None,
        is_external=None,
        job_title=None,
        login_name=None,
        name=None,
    ):
        """
        :param int id_: Id of the Principal in SharePoint's UserInfo List.
        :param str directory_object_id:
        :param str email: Email address of the Principal.
        :param str expiration:
        :param bool is_active: Boolean value representing if the Principal is Active.
        :param bool is_external: Boolean value representing if the Principal is an external user.
        :param str job_title: The Job Title of the Principal.
        :param str login_name: LoginName of the Principal.
        :param str name: Name of the Principal.
        """
        self.id = id_
        self.directoryObjectId = directory_object_id
        self.email = email
        self.expiration = expiration
        self.isActive = is_active
        self.isExternal = is_external
        self.jobTitle = job_title
        self.loginName = login_name
        self.name = name

    @property
    def entity_type_name(self):
        return "SP.Sharing.Principal"

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

bases: Parameter of type ClientValue

Return Value

Returns unspecified type

Class Interface

Methods

__init__(self, id_, directory_object_id, email, expiration, is_active, is_external, job_title, login_name, name)

Purpose: :param int id_: Id of the Principal in SharePoint's UserInfo List. :param str directory_object_id: :param str email: Email address of the Principal. :param str expiration: :param bool is_active: Boolean value representing if the Principal is Active. :param bool is_external: Boolean value representing if the Principal is an external user. :param str job_title: The Job Title of the Principal. :param str login_name: LoginName of the Principal. :param str name: Name of the Principal.

Parameters:

  • id_: Parameter
  • directory_object_id: Parameter
  • email: Parameter
  • expiration: Parameter
  • is_active: Parameter
  • is_external: Parameter
  • job_title: Parameter
  • login_name: Parameter
  • name: Parameter

Returns: None

entity_type_name(self) property

Purpose: Performs entity type name

Returns: None

Required Imports

from office365.runtime.client_value import ClientValue

Usage Example

# Example usage:
# result = Principal(bases)

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class Principal 80.7% similar

    Represents a user or group that can be assigned permissions to control security.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/principal/principal.py
  • class PrincipalInfo 70.1% similar

    Provides access to information about a principal.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/utilities/principal_info.py
  • class PrincipalType 63.0% similar

    An enumeration-style class that defines constants representing different types of principals in a SharePoint or similar access control system.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/principal/type.py
  • class AppPrincipalName 61.8% similar

    A class representing the name of an app principal in SharePoint, inheriting from the Entity base class.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/appprincipal/name.py
  • class User_v1 61.6% similar

    Represents a user in Microsoft SharePoint Foundation, extending the Principal class to provide user-specific operations and properties.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/principal/users/user.py
← Back to Browse