microsoftgraph / microsoftgraph/msgraph-beta-sdk-python
"Syntax error at position 88" error response
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 44
- Fork
- 16
- Merge medio
- 20h 39m
- PR unite (30g)
- 3
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal request builder generato mostrato nel 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. Riproduci la chiamata e confronta la sua richiesta con il Graph URL diretto e con il workaround with_url funzionante. Il lavoro è completato quando la chiamata SDK tipizzata richiede trascrizioni valide senza richiedere with_url.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 55/100