class AccessRequestSettings
A class representing access request settings for SharePoint list items, used to retrieve sharing information from securable objects.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/sharing/access_request_settings.py
4 - 12
simple
Purpose
AccessRequestSettings is a data transfer object (DTO) that encapsulates access request settings for SharePoint resources. It inherits from ClientValue and is designed to be used as part of the SharePoint Client Object Model (CSOM) to retrieve and represent access request configuration when calling GetSharingInformation() on list items. This class serves as a typed container for access request metadata in SharePoint sharing operations.
Source Code
class AccessRequestSettings(ClientValue):
"""
This class returns the access request settings. It’s an optional property that can be retrieved in
Microsoft.SharePoint.Client.Sharing.SecurableObjectExtensions.GetSharingInformation() call on a list item.
"""
@property
def entity_type_name(self):
return "SP.Sharing.AccessRequestSettings"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
__init__: The constructor parameters are inherited from ClientValue base class. No explicit __init__ is defined in this class, so it uses the parent class constructor which typically accepts property values as keyword arguments to initialize the client value object.
Return Value
Instantiation returns an AccessRequestSettings object that represents SharePoint access request settings. The entity_type_name property returns the string 'SP.Sharing.AccessRequestSettings', which is used internally by the SharePoint CSOM framework for type identification and serialization.
Class Interface
Methods
@property
def entity_type_name(self) -> str
property
Purpose: Returns the SharePoint entity type name used for CSOM type identification and serialization
Returns: A string constant 'SP.Sharing.AccessRequestSettings' representing the SharePoint entity type
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
entity_type_name |
str | Read-only property that returns the SharePoint CSOM entity type identifier for access request settings | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
Usage Example
from office365.runtime.client_value import ClientValue
from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.sharing.access_request_settings import AccessRequestSettings
# Typically used as part of GetSharingInformation call
ctx = ClientContext(site_url).with_credentials(credentials)
list_item = ctx.web.lists.get_by_title('Documents').items.get_by_id(1)
# The AccessRequestSettings object is usually returned as part of sharing information
sharing_info = list_item.get_sharing_information()
ctx.execute_query()
# Access the settings (if populated)
if sharing_info.access_request_settings:
settings = sharing_info.access_request_settings
# settings is an instance of AccessRequestSettings
print(settings.entity_type_name) # Output: SP.Sharing.AccessRequestSettings
Best Practices
- This class is typically not instantiated directly by users but is returned as part of SharePoint API responses
- The entity_type_name property should not be modified as it's used for internal SharePoint type identification
- This class is immutable in practice and represents a snapshot of access request settings at query time
- Always execute the query context (ctx.execute_query()) before accessing properties of objects returned from SharePoint
- Check if the access_request_settings property exists and is not None before accessing it, as it's optional in GetSharingInformation responses
- This class inherits from ClientValue, which provides serialization/deserialization capabilities for SharePoint CSOM operations
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class SharingInformation 71.0% similar
-
class ObjectSharingSettings 69.3% similar
-
class SharingInformationRequest 67.3% similar
-
class AccessReviewScheduleSettings 65.7% similar
-
class SharePointSharingSettings 65.2% similar