Error trying to create a subscription on an online meeting with MS Graph API

Neil Stephens 21 Reputation points
2022-10-24T15:38:37.263+00:00

We have a web application that allows a user to create, update or delete an MS Teams meeting using the MS Graph API. This all works fine as long as the user has logged into their MS account in the browser window.

We're now trying to have the web app create a subscription (using the same token) to get updates for when the meeting attendees join or leave the meeting, but our attempts are failing with the error -

code: ExtensionError
message: Operation: Create; Exception: [Status Code: Forbidden; Reason: The request is not authorized for this user or application.]

I think the necessary application permissions have been set -

253482-image.png

The scope of the token also looks to include the necessary permissions -

253595-image.png

We're new to MS Graph so aren't 100% sure, but is it the case that what we're trying to achieve just isn't possible, because according to this article (https://learn.microsoft.com/en-us/graph/changenotifications-for-onlinemeeting#subscribe-to-messages-across-all-channels), delegated permissions are not supported, only application permissions?

Thanks.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,017 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bhanu Kiran 3,606 Reputation points
    2022-10-24T18:27:57.307+00:00

    Hello @Neil Stephens ,

    From the attached screenshot of token scope, it seems you are using delegated permissions. As per the referred document this API is currently supported only using application permission, /beta version.

    Also please note that Subscriptions on onlineMeetings require the encryptionCertificate and encryptionCertificateId property when creating a subscription for notifications with encrypted resource data.

    Please refer to this document to generate a token.

    Hope this helps.
    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Neil Stephens 21 Reputation points
    2022-10-25T14:57:15.147+00:00

    Thanks, I thought that might be the case.

    I'll need to look into using application permissions, although with users connecting from multiple different organisations I'm not sure how that's going to work.

    Is there anyway of finding out if or when online meeting subscriptions would become available in the production version of the API?

    Many thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.