class InsightIdentity
InsightIdentity is a data class that represents the identity properties of sharedInsight items in Microsoft Office 365 services.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/insights/identity.py
4 - 5
simple
Purpose
This class serves as a complex type container for storing and managing identity-related properties of shared insight items within the Office 365 ecosystem. It inherits from ClientValue, which provides serialization and deserialization capabilities for client-server communication. The class is used to encapsulate identity information when working with Microsoft Graph API's insights functionality, particularly for shared resources and collaborative features.
Source Code
class InsightIdentity(ClientValue):
"""Complex type containing properties of sharedInsight items."""
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
ClientValue | - |
Parameter Details
bases: Inherits from ClientValue, which provides the base functionality for client-side value objects that can be serialized/deserialized for API communication with Office 365 services
Return Value
Instantiation returns an InsightIdentity object that can hold identity properties for sharedInsight items. The object inherits serialization methods from ClientValue that return dictionary representations suitable for API requests.
Class Interface
Methods
__init__()
Purpose: Initializes a new InsightIdentity instance, inheriting initialization from ClientValue base class
Returns: None - constructor initializes the object
to_json() -> dict
Purpose: Serializes the InsightIdentity object to a JSON-compatible dictionary (inherited from ClientValue)
Returns: Dictionary representation of the object suitable for JSON serialization and API communication
set_property(name: str, value: any) -> None
Purpose: Sets a property value on the InsightIdentity object (inherited from ClientValue)
Parameters:
name: The name of the property to setvalue: The value to assign to the property
Returns: None - modifies the object in place
get_property(name: str, default_value: any = None) -> any
Purpose: Retrieves a property value from the InsightIdentity object (inherited from ClientValue)
Parameters:
name: The name of the property to retrievedefault_value: Optional default value to return if property doesn't exist
Returns: The value of the requested property or the default value if not found
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
_properties |
dict | Internal dictionary storing the property values of the InsightIdentity object (inherited from ClientValue) | instance |
Dependencies
office365
Required Imports
from office365.runtime.client_value import ClientValue
from office365.insights.insight_identity import InsightIdentity
Usage Example
from office365.insights.insight_identity import InsightIdentity
from office365.runtime.client_value import ClientValue
# Instantiate an InsightIdentity object
identity = InsightIdentity()
# The object can be used as part of Office 365 API requests
# Typically populated by API responses or used to construct requests
# Example: Setting properties (inherited from ClientValue)
identity.set_property('id', 'user@example.com')
identity.set_property('displayName', 'John Doe')
# Serialize to dictionary for API communication
identity_dict = identity.to_json()
# The object is commonly used within larger Office 365 SDK operations
# such as retrieving or managing shared insights
Best Practices
- This class is typically instantiated and populated by the Office 365 SDK during API responses rather than manually created
- Use inherited methods from ClientValue for property management (set_property, get_property) to ensure proper serialization
- The class follows the Office 365 SDK pattern where complex types are represented as ClientValue subclasses
- When working with insights data, this object should be used in conjunction with other Office 365 SDK classes for proper context
- Ensure proper authentication and permissions are configured before using insights-related functionality
- The class is immutable in terms of its structure but properties can be set/modified through inherited methods
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class Identity 73.7% similar
-
class SharedInsight 73.2% similar
-
class IdentitySet 70.6% similar
-
class UsedInsight 69.8% similar
-
class OfficeGraphInsights 68.8% similar