class SPInvitationCreationResult
A data class representing the result of creating a SharePoint invitation, containing email, invitation link, and success status.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/sharepoint/sharing/invitation/creation_result.py
4 - 17
simple
Purpose
This class serves as a data transfer object (DTO) to encapsulate the results of SharePoint invitation creation operations. It inherits from ClientValue, which is part of the Office365 REST API framework, and is used to represent the response data when inviting users to SharePoint resources. The class stores three key pieces of information: the email address of the invitee, the generated invitation link, and whether the invitation creation succeeded.
Source Code
class SPInvitationCreationResult(ClientValue):
"""Specifies a result of adding an invitation."""
def __init__(self):
super(SPInvitationCreationResult, self).__init__()
"""
"""
self.Email = None
self.InvitationLink = None
self.Succeeded = None
@property
def entity_type_name(self):
return "SP.SPInvitationCreationResult"
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
__init__: The constructor takes no parameters and initializes the instance with three attributes set to None: Email (the recipient's email address), InvitationLink (the URL for the invitation), and Succeeded (boolean indicating success/failure of invitation creation).
Return Value
Instantiation returns a new SPInvitationCreationResult object with Email, InvitationLink, and Succeeded attributes initialized to None. The entity_type_name property returns the string 'SP.SPInvitationCreationResult', which is used for serialization and type identification in SharePoint REST API communications.
Class Interface
Methods
__init__(self) -> None
Purpose: Initializes a new SPInvitationCreationResult instance with default None values for all attributes
Returns: None - constructor initializes the instance
@property entity_type_name(self) -> str
property
Purpose: Returns the SharePoint entity type name used for serialization and type identification in REST API operations
Returns: String 'SP.SPInvitationCreationResult' representing the SharePoint entity type
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
Email |
str | None | The email address of the user who received the invitation. Initially None, populated by SharePoint API response. | instance |
InvitationLink |
str | None | The URL link for the invitation that was created. Initially None, populated by SharePoint API response. | instance |
Succeeded |
bool | None | Boolean flag indicating whether the invitation creation was successful. Initially None, populated by SharePoint API response. | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
Usage Example
from office365.runtime.client_value import ClientValue
from office365.sharepoint.sharing.sp_invitation_creation_result import SPInvitationCreationResult
# Instantiate the result object
result = SPInvitationCreationResult()
# Typically populated by SharePoint API responses
result.Email = 'user@example.com'
result.InvitationLink = 'https://sharepoint.com/invite/abc123'
result.Succeeded = True
# Access the entity type name for serialization
entity_type = result.entity_type_name # Returns 'SP.SPInvitationCreationResult'
# Check if invitation was successful
if result.Succeeded:
print(f'Invitation sent to {result.Email}')
print(f'Invitation link: {result.InvitationLink}')
else:
print('Invitation creation failed')
Best Practices
- This class is typically not instantiated directly by users but is populated by SharePoint API responses when creating invitations
- The class is immutable in design - attributes should be set once after instantiation, typically by the API framework
- Always check the Succeeded attribute before attempting to use Email or InvitationLink values
- This class inherits from ClientValue, which provides serialization/deserialization capabilities for SharePoint REST API communication
- The entity_type_name property is used internally by the Office365 framework for type identification and should not be modified
- All three attributes (Email, InvitationLink, Succeeded) start as None and should be validated before use
- This is a passive data container with no business logic or side effects
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class LinkInvitation 72.7% similar
-
class SPSiteCreationResponse 66.8% similar
-
class SharedWithMeViewItemRemovalResult 63.9% similar
-
class GroupCreationInformation_v1 63.7% similar
-
class SharingInformationRequest 63.7% similar