🔍 Code Extractor

class TenantAdminEndpoints

Maturity: 32

A SharePoint entity class representing tenant administration endpoints, providing access to Office 365 admin center endpoint information.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/endpoints.py
Lines:
4 - 14
Complexity:
simple

Purpose

This class serves as a data model for SharePoint tenant administration endpoints. It inherits from the Entity base class and provides a property-based interface to access the O365 Admin Center endpoint URL. It is used within the SharePoint Online API to retrieve and represent tenant-level administrative endpoint configurations.

Source Code

class TenantAdminEndpoints(Entity):
    @property
    def o365_admin_center_endpoint(self):
        """
        :rtype: str or None
        """
        return self.properties.get("O365AdminCenterEndpoint", None)

    @property
    def entity_type_name(self):
        return "Microsoft.Online.SharePoint.TenantAdministration.TenantAdminEndpoints"

Parameters

Name Type Default Kind
bases Entity -

Parameter Details

bases: Inherits from Entity class, which provides the base functionality for SharePoint entities including property management and entity type handling. The Entity base class likely provides the 'properties' dictionary used to store endpoint data.

Return Value

Instantiation returns a TenantAdminEndpoints object that can be used to access tenant administration endpoint information. The o365_admin_center_endpoint property returns either a string containing the URL of the O365 Admin Center endpoint, or None if the endpoint is not configured or available.

Class Interface

Methods

@property o365_admin_center_endpoint(self) -> str | None property

Purpose: Retrieves the URL of the Office 365 Admin Center endpoint for the tenant

Returns: A string containing the O365 Admin Center endpoint URL if available, or None if not configured or unavailable

@property entity_type_name(self) -> str property

Purpose: Returns the fully qualified entity type name used by SharePoint's OData API to identify this entity type

Returns: The string 'Microsoft.Online.SharePoint.TenantAdministration.TenantAdminEndpoints' which is the OData entity type identifier

Attributes

Name Type Description Scope
properties dict Inherited from Entity base class. Dictionary containing the entity's properties including 'O365AdminCenterEndpoint' key with the admin center URL value instance

Dependencies

  • office365

Required Imports

from office365.sharepoint.entity import Entity
from office365.sharepoint.tenant.administration.tenant_admin_endpoints import TenantAdminEndpoints

Usage Example

from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.tenant.administration.tenant_admin_endpoints import TenantAdminEndpoints

# Assuming you have a ClientContext set up with authentication
ctx = ClientContext(site_url).with_credentials(credentials)

# Load tenant admin endpoints (typically retrieved from SharePoint API)
tenant_endpoints = ctx.web.get_property('TenantAdminEndpoints', TenantAdminEndpoints())
ctx.execute_query()

# Access the O365 Admin Center endpoint
admin_center_url = tenant_endpoints.o365_admin_center_endpoint
if admin_center_url:
    print(f"Admin Center URL: {admin_center_url}")
else:
    print("Admin Center endpoint not available")

Best Practices

  • This class is typically instantiated and populated by the SharePoint API client rather than manually created
  • Always check if o365_admin_center_endpoint returns None before using the value
  • This class is read-only and designed for retrieving endpoint information, not for modifying tenant settings
  • Ensure proper authentication and administrative permissions are in place before attempting to access tenant administration endpoints
  • The class relies on the parent Entity class's properties dictionary being properly populated with data from SharePoint API responses

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class TenantAdminSettingsService 77.1% similar

    A service class for managing SharePoint Online tenant administration settings, providing access to tenant-level configuration and sharing status.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/administration/settings_service.py
  • class Office365Tenant 76.0% similar

    Represents a SharePoint Online tenant and provides administrative operations for managing tenant-level settings, CDN configurations, external users, themes, and user profile properties.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/management/office365_tenant.py
  • class TenantAppUtility 71.5% similar

    TenantAppUtility is a placeholder class that extends Entity from the Office365 SharePoint library, representing a tenant application utility in SharePoint.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/apps/utility.py
  • class SearchEndpoints 68.1% similar

    A class representing SharePoint search endpoints configuration, containing admin endpoint and query context for search operations.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/search/endpoints.py
  • class TenantCdnApi 67.0% similar

    TenantCdnApi is a SharePoint entity class that provides access to the Tenant CDN (Content Delivery Network) API for managing CDN settings at the tenant level.

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