microsoftgraph / microsoftgraph/msgraph-beta-sdk-python

"Syntax error at position 88" error response

Aberta
#1,038 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

status:waiting-for-triage type:bug
Linguagem predominante
Python
Estrelas
44
Forks
16
Merge médio
20h 39min
PRs com merge (30d)
3

Descrição

Describe the bug

I am trying to use the msgraph-beta-sdk module to get meeting transcripts for a specific user. It errors with a syntax error message from the server along with a 400 status code. Worth noting that I got this same error from the non-beta module also.

Using the credentials/user_id I've referenced in the code snippet I was able to pull back valid data when posting to f"https://graph.microsoft.com/beta/users/{user_id}/onlineMeetings/getAllTranscripts(meetingOrganizerUserId='{user_id}')", so I am confident this isn't a permissions issue.

Thanks!

Expected behavior

A valid set of transcripts

How to reproduce

`from azure.identity import ClientSecretCredential
from msgraph_beta import GraphServiceClient
from datetime import datetime
import urllib.request
import urllib.parse
import json

login and lookup details

tenant_id = ""
client_id =""
client_secret =""
user_id = ""

Create credential and Graph client (app-only auth)

credential = ClientSecretCredential(
tenant_id=tenant_id,
client_id=client_id,
client_secret=client_secret,
)

scopes = ["https://graph.microsoft.com/.default"]
client = GraphServiceClient(credentials=credential, scopes=scopes)
print("Graph token initialized successfully.")
await client.users.by_user_id(user_id).online_meetings.get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time.get()`

SDK Version

No response

Latest version known to work for scenario above?

1.58.0

Known Workarounds

Just discovered this and now I am curious if this is the intended pattern and I just missed it. If chain a call to with_url I end up putting my filters there and I get back my strong typed result without an error

wu = f"https://graph.microsoft.com/beta/users/{user_id}/onlineMeetings/getAllTranscripts(meetingOrganizerUserId='{user_id}')"
await client.users.by_user_id(user_id).online_meetings.get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time.with_url(wu).get()
Debug output

APIError
Code: 400
message: None
error: MainError(additional_data={}, code='BadRequest', details=None, inner_error=InnerError(additional_data={}, client_request_id='b07e3e18-aa42-4058-a3cf-1ff04185ab33', date=datetime.datetime(2026, 4, 27, 17, 40, 4), odata_type=None, request_id='de6393da-6230-4a5a-bc61-8e4adf989035'), message="Syntax error at position 88 in 'meetingOrganizerUserId='@meetingOrganizerUserId'startDateTime=@startDateTimeendDateTime=@endDateTime'.", target=None)

Click to expand log
await client.users.by_user_id(user_id).online_meetings.get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time.get()
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-607f871d-6826-47c5-a79e-c958f6292d9e/lib/python3.12/site-packages/msgraph_beta/generated/users/item/online_meetings/get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time/get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time_request_builder.py:53, in GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeRequestBuilder.get(self, request_configuration)
     50     raise Exception("Http core is null") 
     51 from .get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time_get_response import GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse
---> 53 return await self.request_adapter.send_async(request_info, GetAllTranscriptsmeetingOrganizerUserIdMeetingOrganizerUserIdWithStartDateTimeWithEndDateTimeGetResponse, error_mapping)
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-607f871d-6826-47c5-a79e-c958f6292d9e/lib/python3.12/site-packages/kiota_http/httpx_request_adapter.py:191, in HttpxRequestAdapter.send_async(self, request_info, parsable_factory, error_map)
    188     parent_span.add_event(RESPONSE_HANDLER_EVENT_INVOKED_KEY)
    189     return await response_handler.handle_response_async(response, error_map)
--> 191 await self.throw_failed_responses(response, error_map, parent_span, parent_span)
    192 if self._should_return_none(response):
    193     return None
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-607f871d-6826-47c5-a79e-c958f6292d9e/lib/python3.12/site-packages/kiota_http/httpx_request_adapter.py:573, in HttpxRequestAdapter.throw_failed_responses(self, response, error_map, parent_span, attribute_span)
    564     else:
    565         exc = APIError(
    566             (
    567                 "The server returned an unexpected status code and the error registered"
   (...)
    571             response_headers,  # type: ignore
    572         )
--> 573     raise exc
    574 finally:
    575     _throw_failed_resp_span.end()
Configuration

No response

Other information

No response

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Direção de pesquisa

Comece pelo request builder gerado mostrado no traceback: users/item/online_meetings/get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time/get_all_transcriptsmeeting_organizer_user_id_meeting_organizer_user_id_with_start_date_time_with_end_date_time_request_builder.py. Reproduza a chamada e compare a requisição dela com a Graph URL direta e com o workaround funcional de with_url. O trabalho estará concluído quando a chamada tipada do SDK solicitar transcrições válidas sem exigir with_url.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
python
Domínio
api
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
55/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.