class SitePropertiesEnumerableFilter
A filter class for enumerating SharePoint Online site properties, used to specify criteria when querying site collections in a SharePoint tenant.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/sites/properties_enumerable_filter.py
4 - 32
simple
Purpose
This class represents a filter object for SharePoint Online Tenant Administration API calls that enumerate site properties. It inherits from ClientValue and provides a structured way to specify filtering criteria such as start index, detail level, personal site inclusion, group ID, and site templates when querying SharePoint site collections. The class is designed to be serialized and sent to SharePoint Online REST APIs for site enumeration operations.
Source Code
class SitePropertiesEnumerableFilter(ClientValue):
def __init__(
self,
_filter,
start_index=None,
include_detail=None,
include_personal_site=None,
group_id_defined=None,
template=None,
):
"""
:param str _filter:
:param str start_index:
:param bool include_detail:
:param int include_personal_site:
:param int group_id_defined:
:param str template:
"""
super(SitePropertiesEnumerableFilter, self).__init__()
self.Filter = _filter
self.GroupIdDefined = group_id_defined
self.IncludeDetail = include_detail
self.IncludePersonalSite = include_personal_site
self.StartIndex = start_index
self.Template = template
@property
def entity_type_name(self):
return "Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerableFilter"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
_filter: A filter string expression to apply when enumerating sites. This is the primary filter criteria for the query.
start_index: Optional string representing the starting position in the result set for pagination. Used to retrieve results starting from a specific index.
include_detail: Optional boolean flag indicating whether to include detailed information about each site in the results. When True, more comprehensive site properties are returned.
include_personal_site: Optional integer flag (typically 0 or 1) indicating whether to include personal OneDrive sites in the enumeration results.
group_id_defined: Optional integer flag indicating whether to filter sites based on whether they have an associated Office 365 Group ID defined.
template: Optional string specifying a SharePoint site template filter (e.g., 'STS#0' for Team Site, 'SITEPAGEPUBLISHING#0' for Communication Site) to limit results to sites created from specific templates.
Return Value
Instantiation returns a SitePropertiesEnumerableFilter object that can be used as a parameter in SharePoint Online Tenant Administration API calls. The object itself doesn't return values but is serialized for API requests.
Class Interface
Methods
__init__(self, _filter, start_index=None, include_detail=None, include_personal_site=None, group_id_defined=None, template=None)
Purpose: Initializes a new SitePropertiesEnumerableFilter instance with specified filtering criteria
Parameters:
_filter: Filter string expression for site enumerationstart_index: Starting position for pagination (optional)include_detail: Whether to include detailed site information (optional)include_personal_site: Whether to include personal OneDrive sites (optional, integer)group_id_defined: Filter based on Office 365 Group ID presence (optional, integer)template: Site template filter string (optional)
Returns: None (constructor)
@property entity_type_name(self) -> str
property
Purpose: Returns the fully qualified entity type name used for SharePoint API serialization
Returns: String 'Microsoft.Online.SharePoint.TenantAdministration.SPOSitePropertiesEnumerableFilter' representing the SharePoint entity type
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
Filter |
str | The filter expression string used to filter site enumeration results | instance |
GroupIdDefined |
int or None | Integer flag indicating whether to filter by Office 365 Group ID presence | instance |
IncludeDetail |
bool or None | Boolean flag indicating whether to include detailed site properties in results | instance |
IncludePersonalSite |
int or None | Integer flag (0 or 1) indicating whether to include personal OneDrive sites | instance |
StartIndex |
str or None | String representing the starting index for pagination of results | instance |
Template |
str or None | Site template identifier string to filter sites by template type | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
Usage Example
from office365.runtime.client_value import ClientValue
from office365.sharepoint.tenant.administration.site_properties_enumerable_filter import SitePropertiesEnumerableFilter
# Create a filter to enumerate all team sites with details
site_filter = SitePropertiesEnumerableFilter(
_filter='',
start_index='0',
include_detail=True,
include_personal_site=0,
group_id_defined=None,
template='STS#0'
)
# The filter would typically be used with a SharePoint tenant context:
# tenant = Tenant(ctx)
# sites = tenant.get_site_properties_from_sharepoint_by_filters(site_filter)
# ctx.execute_query()
# Access the entity type name
print(site_filter.entity_type_name)
Best Practices
- Always provide the _filter parameter even if empty string, as it is required for the API call
- Use start_index for pagination when dealing with large numbers of sites to avoid timeouts
- Set include_detail to False when you only need basic site information to improve performance
- Use template parameter to narrow down results to specific site types for better performance
- The include_personal_site parameter should be 0 (exclude) or 1 (include) as an integer, not a boolean
- This object is typically used as a parameter to tenant administration methods and should not be modified after being passed to an API call
- The entity_type_name property is used internally for serialization and should not be modified
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class SiteProperties 71.3% similar
-
class SitePropertiesCollection 70.7% similar
-
class SiteStateProperties 67.8% similar
-
class SiteCreationProperties 67.5% similar
-
class SiteInfoForSitePicker 63.2% similar