/teams/allMessages is this resource type is paid for create subscription api

Shubham Tak 1 Reputation point
2020-08-01T11:14:33.88+00:00

I am using create subscription API for creating webhooks and I wanted to access the resource type /teams/allMessages but it is showing the error message as -

""message": "Operation: Create; Exception: [Status Code: Unauthorized; Reason: Subscription operations for tenant-wide channel messages is not allowed in 'OnBehalfOfUser' context]""

I wanted to ask if it is a paid resource type ??
If not then which scope is needed to access this resource type to create a subscription in Microsoft Teams using Microsoft graph API

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,438 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,806 Reputation points Microsoft Employee
    2020-08-05T20:17:58.537+00:00

    @Shubham Tak Are you using Delegated permissions or Application permissions ? You may be getting this error if you are using a Delegated permissions as delegated permissions (using both personal and work accounts) are not supported for this API. Also, as Microsoft Teams APIs in Graph are protected API's, you need to get additional validation by using the form available here. Have you gone through this step ?

    You may use /teams/allMessages API without any fees subject to Microsoft API Terms of Use however when GA you may require to pay additional fees based on your data consumed through the API. Please refer to documentation for details.


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.