class WebSharingManager
A SharePoint entity class that serves as a placeholder for web sharing management methods, representing the SP.Sharing.WebSharingManager entity type in SharePoint's REST API.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/sharing/web_sharing_manager.py
4 - 9
simple
Purpose
This class acts as a proxy object for SharePoint's web sharing manager functionality. It inherits from Entity and provides the entity type name for SharePoint REST API operations. The class is designed to be extended or used as part of the office365-sharepoint library's entity framework to manage web-level sharing operations in SharePoint Online.
Source Code
class WebSharingManager(Entity):
"""Specifies a placeholder for all web sharing methods."""
@property
def entity_type_name(self):
return "SP.Sharing.WebSharingManager"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
Entity | - |
Parameter Details
context: The ClientContext object that provides the connection to SharePoint and handles authentication and request execution (inherited from Entity base class)
resource_path: Optional ResourcePath object specifying the location of this entity in SharePoint's resource hierarchy (inherited from Entity base class)
Return Value
Instantiation returns a WebSharingManager object that represents a SharePoint web sharing manager entity. The entity_type_name property returns the string 'SP.Sharing.WebSharingManager' which identifies this entity type in SharePoint's REST API.
Class Interface
Methods
@property
def entity_type_name(self) -> str
property
Purpose: Returns the SharePoint entity type name used for REST API operations and entity identification
Returns: String 'SP.Sharing.WebSharingManager' representing the SharePoint entity type
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
entity_type_name |
str | Read-only property that returns 'SP.Sharing.WebSharingManager', identifying this entity type in SharePoint's REST API | instance |
Dependencies
office365-sharepoint
Required Imports
from office365.sharepoint.sharing.web_sharing_manager import WebSharingManager
Usage Example
from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.sharing.web_sharing_manager import WebSharingManager
# Setup SharePoint context
site_url = 'https://yourtenant.sharepoint.com/sites/yoursite'
ctx = ClientContext(site_url).with_credentials(user_credentials)
# Get the web sharing manager for the current web
web = ctx.web
sharing_manager = web.get_property('SharingManager', WebSharingManager())
ctx.load(sharing_manager)
ctx.execute_query()
# The entity_type_name property identifies the SharePoint entity type
print(sharing_manager.entity_type_name) # Output: SP.Sharing.WebSharingManager
Best Practices
- This class is typically not instantiated directly by end users but obtained through SharePoint web objects or context operations
- Always ensure the ClientContext is properly authenticated before accessing sharing manager functionality
- Use ctx.load() and ctx.execute_query() pattern to retrieve entity properties from SharePoint
- This is a placeholder class that may be extended with additional methods for specific sharing operations
- The entity_type_name property is used internally by the office365 library for REST API endpoint resolution
- Consider this class as part of the larger Entity framework - it inherits all Entity base functionality for property loading, updating, and querying
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class DocumentSharingManager 74.5% similar
-
class MicrofeedManager 68.9% similar
-
class RichSharing 67.6% similar
-
class ObjectSharingInformation 67.2% similar
-
class LimitedWebPartManager 66.8% similar