Skip to content
Advertisement

microsoft graph api to create online meeting programmatically but facing 403 error

I’m using Microsoft Graph Api (PHP->msGraph SDK) to create online meetings. I’m Facing 403 error can someone help me out.

JavaScript

Exception – Client error: POST https://graph.microsoft.com/beta/me/onlineMeetings resulted in a 403 Forbidden response: { “error”: { “code”: “Forbidden”, “message”: “”, “innerError”: { “request-id”: “bd43aa57-511e-4 (truncated…)

While creating an application in azure portal

under API permission i gave permission to access

GraphApi->Delegated Permissions->onlinemeetings.ReadWrite.

Can someone help me with a proper example or proper syntax in PHP.

Thankyou !!..

Advertisement

Answer

You cannot use the client credential flow to get the token to call the /me endpoint. For the client credential flow, it is usually used for server-to-server interactions that must run in the background and do not interact with the user immediately(No user logged in). For the /me endpoint, it is usually User login is required, so you should use auth code flow.

By the way, APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. Therefore, it is recommended that you use the /v1.0 version.

enter image description here

please see:here.


Update:

There are many similar samples, I hope they can help you:

OAuth 2.0 PHP Sample Code.

Authentication and Authorization Using Auth0 in PHP.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement