Why are we receiving a "forbidden" response from the Graph API when permissions are applied

Jonathan Ehman 21 Reputation points
2021-05-07T15:17:58.09+00:00

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?

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,645 questions
Microsoft Teams Development
Microsoft Teams Development
Microsoft Teams: A Microsoft customizable chat-based workspace.Development: The process of researching, productizing, and refining new or existing technologies.
2,866 questions
{count} votes

Accepted answer
  1. Deva-MSFT 2,256 Reputation points Microsoft Employee
    2021-05-11T17:39:04.213+00:00

    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.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Sudip Karmakar 1 Reputation point
    2022-06-08T11:35:57.577+00:00

    hi, I am facing same issue.

    1. Is there any thing that I am missing.
    2. 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:
    209477-screenshot-2022-06-08-165533.png

    Following are Permissions given in Azure App
    209426-screenshot-2022-06-08-170319.png

    0 comments No comments