🔍 Code Extractor

class CollaborationMailbox

Maturity: 24

A SharePoint entity class representing a collaboration mailbox, which is a specialized mailbox type used for team collaboration in SharePoint Online.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/collaboration_mailbox.py
Lines:
4 - 7
Complexity:
simple

Purpose

This class serves as a data model for SharePoint collaboration mailboxes (also known as site mailboxes), which integrate Exchange mailboxes with SharePoint sites. It inherits from the Entity base class and provides the specific entity type identifier for collaboration mailbox resources in the SharePoint REST API. This class is used when working with SharePoint's collaboration features that involve email integration.

Source Code

class CollaborationMailbox(Entity):
    @property
    def entity_type_name(self):
        return "Microsoft.SharePoint.Portal.CollaborationMailbox"

Parameters

Name Type Default Kind
bases Entity -

Parameter Details

__init__: Inherits constructor from Entity base class. The Entity constructor typically accepts context and resource_path parameters for SharePoint API communication, though exact parameters depend on the parent Entity implementation.

Return Value

Instantiation returns a CollaborationMailbox object that represents a SharePoint collaboration mailbox entity. The entity_type_name property returns the string 'Microsoft.SharePoint.Portal.CollaborationMailbox', which is the OData type identifier used in SharePoint REST API requests.

Class Interface

Methods

@property def entity_type_name(self) -> str property

Purpose: Returns the OData entity type name used to identify this resource type in SharePoint REST API requests

Returns: String value 'Microsoft.SharePoint.Portal.CollaborationMailbox' representing the OData type identifier for collaboration mailbox entities

Attributes

Name Type Description Scope
entity_type_name str Read-only property that returns the OData type identifier 'Microsoft.SharePoint.Portal.CollaborationMailbox' for this entity type instance

Dependencies

  • office365-rest-python-client

Required Imports

from office365.sharepoint.portal.collaboration_mailbox import CollaborationMailbox

Usage Example

from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.portal.collaboration_mailbox import CollaborationMailbox
from office365.runtime.auth.user_credential import UserCredential

# Authenticate to SharePoint
site_url = 'https://yourtenant.sharepoint.com/sites/yoursite'
credentials = UserCredential('username@domain.com', 'password')
ctx = ClientContext(site_url).with_credentials(credentials)

# Get or work with collaboration mailbox
mailbox = CollaborationMailbox(ctx)
entity_type = mailbox.entity_type_name
print(f'Entity type: {entity_type}')

# The mailbox object can be used with SharePoint API operations
# that involve collaboration mailbox resources

Best Practices

  • This class is primarily used internally by the office365-rest-python-client library for type identification in SharePoint REST API operations
  • Instantiate this class through the SharePoint ClientContext rather than directly, as it requires proper context and resource path initialization from the parent Entity class
  • The entity_type_name property is used by the library's serialization mechanism to set the correct OData type metadata in API requests
  • Collaboration mailboxes require specific SharePoint and Exchange configuration; ensure your environment supports this feature before attempting to use this class
  • This class follows the Entity pattern used throughout the office365 library, so it inherits standard CRUD operations and query capabilities from the base Entity class
  • The class is read-only in terms of the entity_type_name property; this value should not be modified as it represents the fixed OData type identifier

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class CommunityModeration 60.8% similar

    A SharePoint entity class representing community moderation functionality for SharePoint Portal communities.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/portal/community_moderation.py
  • class MailFolder 60.6% similar

    Represents a mail folder in a user's mailbox (e.g., Inbox, Drafts) that can contain messages, Outlook items, and child folders. Provides methods for folder operations like copying, emptying, and marking messages as read/unread.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/outlook/mail/folders/folder.py
  • class CollaborativeUsers 60.5% similar

    A class representing collaborative users in Microsoft SharePoint Administration, inheriting from ClientValue to provide entity type identification for SharePoint tenant administration operations.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/collaboration/insights_data.py
  • class CollaborationInsightsData 58.5% similar

    A data class representing collaboration insights data for SharePoint tenant administration, containing information about collaborative users and the last report date.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/collaboration/insights_data.py
  • class EntityCollection 58.3% similar

    EntityCollection is a generic collection class for managing SharePoint entity sets, extending ClientObjectCollection with SharePoint-specific functionality.

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