UNIMOODLE / moodle-mod_hybridteaching

P1
Other
2 stars 0 forks source link

Error al crear una sesión con teams #38

Closed tmas0 closed 1 year ago

tmas0 commented 1 year ago

Buenas,

Nos hemos encontrado que al intentar crear una sesión "Crear sesión" con Teams configurado, nos arroja el siguiente error:

Caught Teams service Exception 400 message is Client error: `PATCH https://graph.microsoft.com/v1.0/me/onlineMeetings/MSplZDc1YTE1MS1hMDYzLTQyNzktYjAzOC02ZjQwNjE1ODFiNTkqMCoqMTk6bWVldGluZ19PVFk1TTJZMFpHRXRPVEV3T1MwME9UUmtMVGxrTkRRdE1qazFOR1ZoTnprM01UZzFAdGhyZWFkLnYy` resulted in a `400 Bad Request`
response: {"error":{"code":"BadRequest","message":"Expected not null\r\nParameter name: onlineMeetingUserRequest","innerError":{"date":"2023-11-09T09:46:15","request-id":"e7f6828f-df70-4e78-9f16-1ce8e44aedd6","client-request-id":"e7f6828f-df70-4e78-9f16-1ce8e44aedd6"}}} Stack trace is #0 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/guzzlehttp/guzzle/src/Middleware.php(72): GuzzleHttp\Exception\RequestException::create() #1 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/guzzlehttp/promises/src/Promise.php(209): GuzzleHttp\Middleware::GuzzleHttp\{closure}() #2 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/guzzlehttp/promises/src/Promise.php(158): GuzzleHttp\Promise\Promise::callHandler() #3 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/guzzlehttp/promises/src/TaskQueue.php(52): GuzzleHttp\Promise\Promise::GuzzleHttp\Promise\{closure}() #4 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/guzzlehttp/promises/src/Promise.php(251): GuzzleHttp\Promise\TaskQueue->run() #5 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/guzzlehttp/promises/src/Promise.php(227): GuzzleHttp\Promise\Promise->invokeWaitFn() #6 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/guzzlehttp/promises/src/Promise.php(272): GuzzleHttp\Promise\Promise->waitIfPending() #7 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/guzzlehttp/promises/src/Promise.php(229): GuzzleHttp\Promise\Promise->invokeWaitList() #8 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/guzzlehttp/promises/src/Promise.php(69): GuzzleHttp\Promise\Promise->waitIfPending() #9 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/guzzlehttp/guzzle/src/Client.php(189): GuzzleHttp\Promise\Promise->wait() #10 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/vendor/microsoft/microsoft-graph/src/Http/GraphRequest.php(321): GuzzleHttp\Client->request() #11 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/classes/teams_handler.php(210): Microsoft\Graph\Http\GraphRequest->execute() #12 /var/www/html/mymoodle/moodle/mod/hybridteaching/vc/teams/classes/sessions.php(80): hybridteachvc_teams\teams_handler->createmeeting() #13 /var/www/html/mymoodle/moodle/mod/hybridteaching/loadmeeting.php(125): hybridteachvc_teams\sessions->create_unique_session_extended() #14 {main}

Warning: Trying to access array offset on value of type null in /var/www/html/mymoodle/moodle/mod/hybridteaching/loadmeeting.php on line 128

Warning: Trying to access array offset on value of type null in /var/www/html/mymoodle/moodle/mod/hybridteaching/loadmeeting.php on line 129

Un saludo

mcalvoisyccom commented 1 year ago

Hola, no podemos reproducir el error, podemos crear reuniones teams sin problemas. Posiblemente sean los permisos a asignar en Azure. Comprueba que tienes asignados los siguientes permisos. Faltaba un par por añadir en el readme.md:

Asignar permisos de aplicación: Application.Read.All Calendars.Read Calendars.ReadWrite OnlineMeetingArtifact.Read.All OnlineMeetingRecording.Read.All OnlineMeetings.Read.All OnlineMeetings.ReadWrite.All OnlineMeetingTranscript.Read.All User.Read.All User.ReadWrite.All VirtualEvent.Read.All

Asignar permisos delegados: OnlineMeetings.ReadWrite OnlineMeetingRecording.Read.All Calendars.ReadWrite offline_access User.Read VirtualEvent.Read

tmas0 commented 1 year ago

Buenas,

Con todos esos privilegios dados, nos sigue dando el mismo error.

"code":"BadRequest","message":"Expected not null Parameter name: onlineMeetingUserRequest"

Y eso nos impide probar en Teams.

mcalvoisyccom commented 1 year ago

Hola Toni, seguimos sin poder reproducir el error. ¿Nos puedes decir, por favor, si añades moderadores en los participantes? Si es así, el usuario moderador pertenece al tenant configurado?

mcalvoisyccom commented 1 year ago

Hola Toni, perdona, hemos podido reproducir ya el problema (un array mal añadido). Esperamos hoy mismo subir nuevo código que solucione esto.

mcalvoisyccom commented 1 year ago

Cerramos issue, solucionado con el cambio anterior.

eprigorodov commented 1 week ago

Hi guys, sorry for late commenting and for the English, just found that this error might mean that some parameter -- with any name, not "onlineMeetingUserRequest", -- was passed to MS Graph call with invalid value, e.g. string instead of Boolean.