Check the documentation the above API call create onlinemeeting is not supported with personal Microsoft account in delegated scenario, hence you're getting the error. Test it with your work/school account.
Why are we receiving a "forbidden" response from the Graph API when permissions are applied
Using the Graph Explorer (https://developer.microsoft.com/en-us/graph/graph-explorer) I tried to send a POST to me/onlineMeetings with the following payload:
{
"startDateTime": "2021-05-08T10:00:00.000000-07:00",
"endDateTime": "2021-05-08T10:30:00.000000-07:00",
"subject": "This is a test"
}
Permissions Scope is set to: openid offline_access profile email User.Read OnlineMeetings.ReadWrite
The response is as follows:
{
"error": {
"code": "Forbidden",
"message": "An error has occurred.",
"innerError": {
"date": "2021-05-07T15:02:05",
"request-id": "8d724785-3f7d-4fa3-a7d0-2dafae19060c",
"client-request-id": "fcc721fd-a9e3-a984-84d6-f2a5a193f3bc"
}
}
}
the account is signed up for a free Microsoft Teams account
What condition is causing me to get a forbidden response?
-
Deva-MSFT 2,256 Reputation points Microsoft Employee
2021-05-11T17:39:04.213+00:00
1 additional answer
Sort by: Most helpful
-
Sudip Karmakar 1 Reputation point
2022-06-08T11:35:57.577+00:00 hi, I am facing same issue.
- Is there any thing that I am missing.
- If Everything is Perfect then what is Reason of this Error?
My Account type is work/school, I tried the following endpoint in Postman and received an Error with status code 403.
API EndPoint - POST - https://graph.microsoft.com/v1.0/users/{userId}/onlineMeetings
BODY -
{
"subject":"User Token Live Event",
"startDateTime":"2022-06-08T16:50:34.2444915+00:00",
"endDateTime":"2022-06-08T20:30:34.2464912+00:00",
"isBroadcast": true,
"broadcastSettings": {
"allowedAudience": "everyone",
"isRecordingEnabled": true,
"isAttendeeReportEnabled": true
}
}Response:
Following are Permissions given in Azure App