class ExternalUser
A class representing an external user in SharePoint Online tenant management, inheriting from Entity base class.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/tenant/management/externalusers/external_user.py
4 - 7
simple
Purpose
This class models external users (users outside the organization) in SharePoint Online tenant management. It provides a specialized entity type for working with external user objects through the SharePoint REST API. The class primarily serves as a data model with specific entity type identification for SharePoint's tenant management operations involving external users.
Source Code
class ExternalUser(Entity):
@property
def entity_type_name(self):
return "Microsoft.Online.SharePoint.TenantManagement.ExternalUser"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
Entity | - |
Parameter Details
__init__: Inherits constructor from Entity base class. The exact parameters depend on the Entity parent class implementation, but typically would include context and resource path parameters for SharePoint API operations.
Return Value
Instantiation returns an ExternalUser object that represents a SharePoint external user entity. The entity_type_name property returns the string 'Microsoft.Online.SharePoint.TenantManagement.ExternalUser' which identifies this entity type in SharePoint's type system.
Class Interface
Methods
@property entity_type_name(self) -> str
property
Purpose: Returns the fully qualified entity type name used by SharePoint's REST API to identify this entity type
Returns: String value 'Microsoft.Online.SharePoint.TenantManagement.ExternalUser' representing the SharePoint entity type
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
entity_type_name |
str | Read-only property that returns the SharePoint entity type identifier for external users | instance |
Dependencies
office365
Required Imports
from office365.sharepoint.entity import Entity
from office365.sharepoint.tenant.administration.external_user import ExternalUser
Usage Example
from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.tenant.administration.external_user import ExternalUser
from office365.runtime.auth.user_credential import UserCredential
# Setup authentication
site_url = 'https://yourtenant.sharepoint.com'
username = 'admin@yourtenant.onmicrosoft.com'
password = 'your_password'
# Create context
ctx = ClientContext(site_url).with_credentials(UserCredential(username, password))
# Work with external user (typically retrieved from tenant admin operations)
# External users are usually accessed through tenant administration APIs
external_user = ExternalUser(ctx)
print(external_user.entity_type_name) # Outputs: Microsoft.Online.SharePoint.TenantManagement.ExternalUser
Best Practices
- This class is typically not instantiated directly but rather retrieved through SharePoint tenant administration API calls
- Ensure proper authentication and tenant admin permissions before attempting to work with external user objects
- The entity_type_name property is used internally by the Office365 library for proper serialization and API communication
- External users represent users outside your organization who have been granted access to SharePoint resources
- This class inherits all functionality from the Entity base class, so refer to Entity documentation for available methods and properties
- Use this class in conjunction with tenant administration operations for managing external sharing and collaboration
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class ExternalUserCollection 84.3% similar
-
class RemoveExternalUsersResults 78.2% similar
-
class GetExternalUsersResults 78.2% similar
-
class UserExperienceState 67.2% similar
-
class External 65.5% similar