🔍 Code Extractor

class InvitationParticipantInfo

Maturity: 49

A data class representing an entity being invited to a group call, containing participant identification, visibility settings, and call routing configuration.

File:
/tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/communications/calls/invitation_participant_info.py
Lines:
5 - 30
Complexity:
simple

Purpose

This class encapsulates information about a participant being invited to a group call in Microsoft Graph API communications. It manages participant identity, visibility preferences (hidden status), audio routing configuration, and call replacement scenarios. The class inherits from ClientValue, making it suitable for serialization and transmission in API requests related to group call invitations.

Source Code

class InvitationParticipantInfo(ClientValue):
    """This resource is used to represent the entity that is being invited to a group call."""

    def __init__(
        self,
        hidden=None,
        identity=IdentitySet(),
        participant_id=None,
        remove_from_default_audio_routing_group=None,
        replaces_call_id=None,
    ):
        """
        :param bool hidden: Optional. Whether to hide the participant from the roster.
        :param IdentitySet identity: The identitySet associated with this invitation.
        :param str participant_id: Optional. The ID of the target participant.
        :param bool remove_from_default_audio_routing_group: Optional. Whether to remove them from the main mixer.
        :param str replaces_call_id: Optional. The call which the target identity is currently a part of.
            For peer-to-peer case, the call will be dropped once the participant is added successfully.
        """
        self.hidden = hidden
        self.identity = identity
        self.participantId = participant_id
        self.removeFromDefaultAudioRoutingGroup = (
            remove_from_default_audio_routing_group
        )
        self.replacesCallId = replaces_call_id

Parameters

Name Type Default Kind
bases ClientValue -

Parameter Details

hidden: Optional boolean flag that determines whether the invited participant should be hidden from the call roster. When set to True, the participant will not be visible to other call participants. Defaults to None.

identity: An IdentitySet object that contains the identity information (user, application, device, etc.) of the entity being invited. This is the primary identifier for the participant. Defaults to an empty IdentitySet() instance.

participant_id: Optional string containing the unique identifier of the target participant. This can be used to reference a specific participant in the call system. Defaults to None.

remove_from_default_audio_routing_group: Optional boolean flag that controls whether the participant should be excluded from the main audio mixer. When True, the participant's audio will not be part of the default audio routing. Defaults to None.

replaces_call_id: Optional string containing the ID of an existing call that the target participant is currently in. When specified, that call will be terminated once the participant successfully joins the new group call. This is useful for transferring participants between calls. Defaults to None.

Return Value

Instantiation returns an InvitationParticipantInfo object with all specified attributes set. The object serves as a data container that can be serialized for API communication. No methods return values as this is primarily a data class.

Class Interface

Methods

__init__(self, hidden=None, identity=IdentitySet(), participant_id=None, remove_from_default_audio_routing_group=None, replaces_call_id=None)

Purpose: Initializes an InvitationParticipantInfo instance with participant details for a group call invitation

Parameters:

  • hidden: Optional boolean to hide participant from roster
  • identity: IdentitySet object containing participant identity information
  • participant_id: Optional string ID of the target participant
  • remove_from_default_audio_routing_group: Optional boolean to exclude from main audio mixer
  • replaces_call_id: Optional string ID of call to replace when participant joins

Returns: None (constructor)

Attributes

Name Type Description Scope
hidden bool or None Whether the participant should be hidden from the call roster instance
identity IdentitySet The identity information associated with this invitation instance
participantId str or None The unique identifier of the target participant instance
removeFromDefaultAudioRoutingGroup bool or None Whether to exclude the participant from the main audio mixer instance
replacesCallId str or None The ID of the call that will be terminated when this participant joins instance

Dependencies

  • office365

Required Imports

from office365.directory.permissions.identity_set import IdentitySet
from office365.runtime.client_value import ClientValue

Usage Example

from office365.directory.permissions.identity_set import IdentitySet
from office365.communications.calls.invitation_participant_info import InvitationParticipantInfo

# Create an identity for the participant
identity = IdentitySet()
identity.user = {'id': 'user-guid-123', 'displayName': 'John Doe'}

# Create invitation info for a visible participant
participant_info = InvitationParticipantInfo(
    hidden=False,
    identity=identity,
    participant_id='participant-123',
    remove_from_default_audio_routing_group=False
)

# Create invitation info for replacing an existing call
replacement_info = InvitationParticipantInfo(
    identity=identity,
    replaces_call_id='existing-call-id-456'
)

# Create a hidden participant (e.g., for monitoring)
hidden_participant = InvitationParticipantInfo(
    hidden=True,
    identity=identity,
    remove_from_default_audio_routing_group=True
)

Best Practices

  • Always provide a valid IdentitySet object to properly identify the participant being invited
  • Use the hidden parameter when you need to add participants that should not be visible to others (e.g., recording bots, monitoring services)
  • Set remove_from_default_audio_routing_group to True for participants that should not contribute to the main audio mix (e.g., observers)
  • Use replaces_call_id when transferring a participant from one call to another to ensure the old call is properly terminated
  • This class is immutable after instantiation - create a new instance if you need to modify participant information
  • The class uses camelCase for attribute names (participantId, replacesCallId) to match Microsoft Graph API conventions
  • This is a data transfer object (DTO) - it does not contain business logic or methods beyond initialization
  • Ensure the identity parameter contains sufficient information to uniquely identify the participant in your organization's context

Similar Components

AI-powered semantic similarity - components with related functionality:

  • class MeetingParticipantInfo 71.1% similar

    A data class representing information about a participant in a meeting, including their identity, role, and user principal name.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/communications/onlinemeetings/participant_info.py
  • class Participant 70.6% similar

    Represents a participant in a call, providing methods to manage participant state including inviting others, controlling hold music, and accessing participant information.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/communications/calls/participant.py
  • class InvitedUserMessageInfo 68.8% similar

    A data class that configures invitation messages for invited users, including CC recipients, custom message body, and language preferences.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/directory/invitations/message_info.py
  • class ParticipantInfo 65.8% similar

    A data class that stores additional properties about a participant's identity, specifically their country code location information.

    From: /tf/active/vicechatdev/SPFCsync/venv/lib64/python3.11/site-packages/office365/communications/calls/participant_info.py
  • class LinkInvitation 65.0% similar

    A data class representing an invitation to a tokenized SharePoint sharing link, tracking who was invited, by whom, and when.

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