Hello,
I am trying to join a scheduled call
request_body = Call(
odata_type="#microsoft.graph.call",
callback_uri="https://5141-185-249-114-114.ngrok-free.app/callback",
tenant_id=self.tenant_id,
# requested_modalities = [
# Modality.Audio,
# ],
media_config=ServiceHostedMediaConfig(
odata_type="#microsoft.graph.serviceHostedMediaConfig"
# pre_fetch_media = [
# MediaInfo(
# uri = "https://cdn.contoso.com/beep.wav",
# resource_id = "f8971b04-b53e-418c-9222-c82ce681a582",
# ),
# MediaInfo(
# uri = "https://cdn.contoso.com/cool.wav",
# resource_id = "86dc814b-c172-4428-9112-60f8ecae1edb",
# ),
# ],
),
chat_info = ChatInfo(
odata_type="#microsoft.graph.chatInfo",
thread_id="19:meeting_OWI4NGY3NmEtZjU3OC00OGU2LWE0MTMtYWY5NmE0OWIwMjRk@thread.v2",
message_id="0",
),
meeting_info=OrganizerMeetingInfo(
odata_type="#microsoft.graph.organizerMeetingInfo",
organizer=IdentitySet(
odata_type="#microsoft.graph.identitySet",
user=Identity(
odata_type="#microsoft.graph.identity",
id=user_id,
display_name="Bob",
additional_data={
"tenant_id": self.tenant_id,
}
),
),
additional_data={
"allow_conversation_without_host":True,
}
),
)
try:
response = await self.graph_client.communications.calls.post(request_body)
print(response)
except Exception as e:
print(f"Failed to join call: {e}")
the user_id I am using is the user id of the user who scheduled the call. The tenant id is the same tenant id I used when creating credentials for the graph client. I am still getting this error:
error: MainError(additional_data={}, code='7505', details=None, inner_error=InnerError(additional_data={}, client_request_id='b502ccb8-30ce-49f6-8e0c-b984708d6d0b', date=DateTime(2025, 1, 20, 16, 44, 10, tzinfo=Timezone('UTC')), odata_type=None, request_id='11743bf1-d06d-4f97-93a2-fc94f4f6cd10'), message='Request authorization tenant mismatch.', target=None)
I simply want to join the scheduled online call as a bot user and then start the recording.