question

AngeloBelchior-8250 avatar image
0 Votes"
AngeloBelchior-8250 asked PrithviKamble-MSFT-9239 commented

Problem in integration

When i try to create a meeting via api appear this error:

Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: POST https://graph.microsoft.com/v1.0/me/onlineMeetings resulted in a 400 Bad Request response: {"error":{"code":"BadRequest","message":"/me request is only valid with delegated authentication flow.","innerError":{"date":"2021-09-08T12:03:27","request-id":"61e43cf1-e5f6-41d2-b42c-f1699a0cc9fe","client-request-id":"61e43cf1-e5f6-41d2-b42c-f1699a0cc9fe"}}} in D:\xmp7\htdocs\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php:111 Stack trace: #0 D:\xmp7\htdocs\vendor\guzzlehttp\guzzle\src\Middleware.php(66): GuzzleHttp\Exception\RequestException::create(Object(GuzzleHttp\Psr7\Request), Object(GuzzleHttp\Psr7\Response)) #1 D:\xmp7\htdocs\vendor\guzzlehttp\promises\src\Promise.php(204): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response)) #2 D:\xmp7\htdocs\vendor\guzzlehttp\promises\src\Promise.php(153): GuzzleHttp\Promise\Promise::callHandler(1, Object(GuzzleHttp\Psr7\Response), NULL) #3 D:\xmp7\htdocs\vendor\guzzle in D:\xmp7\htdocs\vendor\guzzlehttp\guzzle\src\Exception\RequestException.php on line 111

Who know how can solve this?

Thanks

office-teams-app-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

PrithviKamble-MSFT-9239 avatar image
0 Votes"
PrithviKamble-MSFT-9239 answered PrithviKamble-MSFT-9239 commented

Hi @AngeloBelchior-8250 ,
Can you check once if you have required delegated or application permissions to create online meetings using graph API. You will require OnlineMeetings.ReadWrite permission. For more details you can refer permissions section of below document.
https://docs.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&tabs=http


Thanks

· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Hi I put the OnlineMeetings.ReadWrite permissionon my app.

132385-image.png



But the error is happening.

ient error: POST https://graph.microsoft.com/v1.0/me/onlineMeetings resulted in a 400 Bad Request response: {"error":{"code":"BadRequest","message":"/me request is only valid with delegated authentication flow.","innerError":{"date":"2021-09-15T10:19:31","request-id":"846f1a23-8adf-4024-8f9a-5aa57219d2fd","client-request-id":"846f1a23-8adf-4024-8f9a-5aa57219d2fd"}}}



0 Votes 0 ·
image.png (77 B)

Hi @AngeloBelchior-8250 ,
If you are creating meeting using application permission token you will need to use POST /users/{userId}/onlineMeetings endpoint.

For using POST /me/onlineMeetings endpoint you will need to user user delegated permissions and it will not work with application permissions.

You can refer below link for more details.

https://docs.microsoft.com/en-us/graph/api/application-post-onlinemeetings?view=graph-rest-1.0&tabs=http#http-request

Thanks

0 Votes 0 ·

Hi @AngeloBelchior-8250 ,
Did it worked for you or are you still facing the issue ? Let us know if you are still facing the issue.



Thanks

0 Votes 0 ·
Show more comments