Error while accessing online meeting API

Rupam Hardikar 1 Reputation point
2022-03-03T08:25:03.337+00:00

Trying to execute below API

https://graph.microsoft.com/v1.0/users/{principalname}/onlineMeetings

With Authorization token and below request body.

{
"startDateTime":"2019-07-12T14:30:34.2444915-07:00",
"endDateTime":"2019-07-12T15:00:34.2464912-07:00",
"subject":"User Token Meeting"
}

Generate token is having scope as as mentioned below.

AccessReview.Read.All AccessReview.ReadWrite.All Agreement.Read.All Agreement.ReadWrite.All AgreementAcceptance.Read AgreementAcceptance.Read.All Analytics.Read AppCatalog.ReadWrite.All ApprovalRequest.Read.AdminConsentRequest ApprovalRequest.Read.CustomerLockbox ApprovalRequest.Read.EntitlementManagement ApprovalRequest.Read.PriviligedAccess ApprovalRequest.ReadWrite.AdminConsentRequest ApprovalRequest.ReadWrite.CustomerLockbox ApprovalRequest.ReadWrite.EntitlementManagement ApprovalRequest.ReadWrite.PriviligedAccess Calendars.ReadWrite Contacts.ReadWrite Files.ReadWrite.All Mail.ReadWrite Notes.ReadWrite.All openid People.Read profile Sites.ReadWrite.All Tasks.ReadWrite User.Read User.Read.All User.ReadBasic.All User.ReadWrite User.ReadWrite.All UserActivity.ReadWrite.CreatedByApp UserNotification.ReadWrite.CreatedByApp email OnlineMeetings.ReadWrite

Still getting 400 error response .

Response Body :

{"error":{"code":"AuthenticationError","message":"Error authenticating with resource","innerError":{"date":"2022-03-03T08:20:29","request-id":"319e7b55-a751-46ac-88c6-0ebd684d1d79","client-request-id":"319e7b55-a751-46ac-88c6-0ebd684d1d79"}}}

Account type used here is Corporate.

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
5,532 questions
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

1 answer

Sort by: Most helpful
  1. CarlZhao-MSFT 37,216 Reputation points
    2022-03-03T08:41:38.963+00:00

    Hi @Rupam Hardikar

    This is because you didn't create an application access policy, according to the official doc: to use application permission for this API, tenant administrators must create an application access policy and grant it to a user to authorize the app configured in the policy to create online meetings on behalf of that user (with user ID specified in the request path).

    179539-image.png

    ----------

    Update:

    Also, if you are using the /me endpoint to create a meeting, make sure you are logged in with your work account and not your personal account.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.