question

RupamHardikar-8462 avatar image
0 Votes"
RupamHardikar-8462 asked saldana-msft edited

Error while accessing online meeting API

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-authenticatoroffice-teams-app-devmicrosoft-graph-teamworkmicrosoft-graph-usersmicrosoft-graph-applications
· 1
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.

You are creating an online meeting on behalf of someone else, then you need to create an application access policy. The application access policy does not need to be created only when calling the /me endpoint to create an online meeting.

0 Votes 0 ·

1 Answer

CarlZhao-MSFT avatar image
0 Votes"
CarlZhao-MSFT answered CarlZhao-MSFT commented

Hi @RupamHardikar-8462

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.



image.png (35.4 KiB)
· 10
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.

If user name provided in path is admin user still i need to create application access policy ?

0 Votes 0 ·
CarlZhao-MSFT avatar image CarlZhao-MSFT RupamHardikar-8462 ·

Of course, this has nothing to do with your user role but with the permissions you use. If you use application permissions then you must create an application access policy.

0 Votes 0 ·
CarlZhao-MSFT avatar image CarlZhao-MSFT RupamHardikar-8462 ·

Unless you use delegated permissions and call the /me endpoint.

0 Votes 0 ·

Tried using me endpoint as well. still getting same error. refer screenshot.
179617-image.png


0 Votes 0 ·
image.png (56.0 KiB)

Delegated permissions are also granted to App.

0 Votes 0 ·
Show more comments
CarlZhao-MSFT avatar image CarlZhao-MSFT RupamHardikar-8462 ·

Hi @RupamHardikar-8462 Please let me know if there are any updates to your question :)

0 Votes 0 ·