class CallRecord
Represents a single peer-to-peer call or a group call between multiple participants in Microsoft 365, sometimes referred to as an online meeting.
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/communications/callrecords/call_record.py
8 - 33
moderate
Purpose
This class models call records from Microsoft 365 communications, providing access to call metadata including the meeting URL, organizer information, and associated sessions. It extends the Entity base class and is used to retrieve and manage information about completed or ongoing calls, whether they are peer-to-peer or group calls. The class provides read-only properties to access call details and is typically instantiated by the Office 365 SDK when fetching call records from the Microsoft Graph API.
Source Code
class CallRecord(Entity):
"""Represents a single peer-to-peer call or a group call between multiple participants,
sometimes referred to as an online meeting."""
@property
def join_web_url(self):
"""Meeting URL associated to the call. May not be available for a peerToPeer call record type."""
return self.properties.get("joinWebUrl", None)
@property
def organizer(self):
"""The organizing party's identity.."""
return self.properties.get("organizer", IdentitySet())
@property
def sessions(self):
"""
List of sessions involved in the call. Peer-to-peer calls typically only have one session, whereas group
calls typically have at least one session per participant.
"""
return self.properties.get(
"sessions",
EntityCollection(
self.context, Session, ResourcePath("sessions", self.resource_path)
),
)
Parameters
| Name | Type | Default | Kind |
|---|---|---|---|
bases |
Entity | - |
Parameter Details
bases: Inherits from Entity class, which provides base functionality for Microsoft Graph API entities including context management, property storage, and resource path handling. The Entity base class handles the underlying data structure and API communication.
Return Value
Instantiation returns a CallRecord object that represents a call record entity from Microsoft Graph API. The object provides access to call properties through read-only properties: join_web_url (string or None), organizer (IdentitySet object), and sessions (EntityCollection of Session objects).
Class Interface
Methods
@property join_web_url(self) -> str | None
property
Purpose: Returns the meeting URL associated with the call record
Returns: String containing the meeting URL if available, or None if not available (typically for peer-to-peer calls)
@property organizer(self) -> IdentitySet
property
Purpose: Returns the identity information of the party that organized the call
Returns: IdentitySet object containing the organizer's identity information (user, application, or device details)
@property sessions(self) -> EntityCollection
property
Purpose: Returns the collection of sessions involved in the call
Returns: EntityCollection of Session objects. Peer-to-peer calls typically have one session, group calls have at least one session per participant
Attributes
| Name | Type | Description | Scope |
|---|---|---|---|
properties |
dict | Inherited from Entity base class. Dictionary storing the raw property values retrieved from the Microsoft Graph API | instance |
context |
ClientContext | Inherited from Entity base class. The client context used for API communication and request management | instance |
resource_path |
ResourcePath | Inherited from Entity base class. The API resource path for this call record entity | instance |
Dependencies
office365
Required Imports
from office365.communications.callrecords.call_record import CallRecord
from office365.communications.callrecords.session import Session
from office365.directory.permissions.identity_set import IdentitySet
from office365.entity import Entity
from office365.entity_collection import EntityCollection
from office365.runtime.paths.resource_path import ResourcePath
Usage Example
from office365.graph_client import GraphClient
from office365.communications.callrecords.call_record import CallRecord
# Authenticate with Microsoft Graph
client = GraphClient.with_client_secret(tenant_id, client_id, client_secret)
# Retrieve a specific call record by ID
call_record = client.communications.call_records['call-record-id'].get().execute_query()
# Access call record properties
if call_record.join_web_url:
print(f"Meeting URL: {call_record.join_web_url}")
# Access organizer information
organizer = call_record.organizer
if organizer.user:
print(f"Organizer: {organizer.user.display_name}")
# Access sessions in the call
sessions = call_record.sessions
for session in sessions:
print(f"Session ID: {session.id}")
print(f"Start time: {session.start_date_time}")
print(f"End time: {session.end_date_time}")
Best Practices
- This class is typically instantiated by the Office 365 SDK framework, not directly by users. Access CallRecord instances through the GraphClient API.
- All properties are read-only and lazily loaded from the underlying properties dictionary. Call execute_query() on the parent context to ensure data is fetched from the API.
- The join_web_url property may return None for peer-to-peer calls, always check for None before using.
- The organizer property returns an IdentitySet object which may contain user, application, or device identity information.
- The sessions property returns an EntityCollection that can be iterated. For peer-to-peer calls, expect one session; for group calls, expect multiple sessions (typically one per participant).
- Ensure proper Microsoft Graph API permissions are configured before attempting to access call records.
- Call records are typically available after a call has ended and may take time to be fully populated in the system.
- Use the context property inherited from Entity to manage API requests and batch operations efficiently.
Tags
Similar Components
AI-powered semantic similarity - components with related functionality:
-
class Call 70.1% similar
-
class CallCollection 64.6% similar
-
class Session 62.7% similar
-
class CloudCommunications 61.8% similar
-
class Participant 59.9% similar